diff options
author | Ray Lai <ray@cvs.openbsd.org> | 2007-03-23 02:41:03 +0000 |
---|---|---|
committer | Ray Lai <ray@cvs.openbsd.org> | 2007-03-23 02:41:03 +0000 |
commit | 2fce7a66c3433071761fc408a888a66363b2d474 (patch) | |
tree | ea7e7e67fe83c166bcaaab4033de4eba6e0578b2 /usr.bin/sendbug/sendbug.c | |
parent | 2d704b1cb791b24cdc6ab056f0b127eceec2ec49 (diff) |
Get rid of silly gcc warning.
OK deraadt@.
Diffstat (limited to 'usr.bin/sendbug/sendbug.c')
-rw-r--r-- | usr.bin/sendbug/sendbug.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/sendbug/sendbug.c b/usr.bin/sendbug/sendbug.c index 45b29a0e8a4..217731ac6f9 100644 --- a/usr.bin/sendbug/sendbug.c +++ b/usr.bin/sendbug/sendbug.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sendbug.c,v 1.3 2007/03/23 02:28:14 deraadt Exp $ */ +/* $OpenBSD: sendbug.c,v 1.4 2007/03/23 02:41:02 ray Exp $ */ /* * Written by Ray Lai <ray@cyth.net>. @@ -279,7 +279,10 @@ send_file(const char *file, int dst) if (blank && (sp = memchr(buf, '<', len)) != NULL) ep = memchr(sp, '>', len - (sp - buf + 1)); /* Length of string before comment. */ - copylen = ep ? sp - buf : len; + if (ep) + copylen = sp - buf; + else + copylen = len; if (atomicio(vwrite, dst, buf, copylen) != copylen) { int saved_errno = errno; |