diff options
author | 2008-11-26 00:09:02 +0000 | |
---|---|---|
committer | 2008-11-26 00:09:02 +0000 | |
commit | c838fb7a9fd98a83feb66053e2537fb00697c9f8 (patch) | |
tree | e44b55e26e00cc146725a9cd05c63c79472a24e8 /usr.bin/cvs/logmsg.c | |
parent | add '_btd' to the aliases too. of course, I forgot that. (diff) | |
download | wireguard-openbsd-c838fb7a9fd98a83feb66053e2537fb00697c9f8.tar.xz wireguard-openbsd-c838fb7a9fd98a83feb66053e2537fb00697c9f8.zip |
Small optimization.
OK tobias@
Diffstat (limited to 'usr.bin/cvs/logmsg.c')
-rw-r--r-- | usr.bin/cvs/logmsg.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.bin/cvs/logmsg.c b/usr.bin/cvs/logmsg.c index 68a41e7860c..79a33fa5a25 100644 --- a/usr.bin/cvs/logmsg.c +++ b/usr.bin/cvs/logmsg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: logmsg.c,v 1.50 2008/06/10 01:00:34 joris Exp $ */ +/* $OpenBSD: logmsg.c,v 1.51 2008/11/26 00:09:02 ray Exp $ */ /* * Copyright (c) 2007 Joris Vink <joris@openbsd.org> * @@ -66,6 +66,7 @@ cvs_logmsg_read(const char *path) while ((buf = fgetln(fp, &len))) { if (buf[len - 1] == '\n') { buf[len - 1] = '\0'; + --len; } else { lbuf = xmalloc(len + 1); memcpy(lbuf, buf, len); @@ -73,8 +74,6 @@ cvs_logmsg_read(const char *path) buf = lbuf; } - len = strlen(buf); - if (!strncmp(buf, CVS_LOGMSG_PREFIX, sizeof(CVS_LOGMSG_PREFIX) - 1)) continue; |