From 2fce7a66c3433071761fc408a888a66363b2d474 Mon Sep 17 00:00:00 2001 From: Ray Lai Date: Fri, 23 Mar 2007 02:41:03 +0000 Subject: Get rid of silly gcc warning. OK deraadt@. --- usr.bin/sendbug/sendbug.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'usr.bin/sendbug') 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 . @@ -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; -- cgit v1.2.3