From owner-freebsd-bugs Mon Oct 23 5:37: 6 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from starbug.ugh.net.au (starbug.ugh.net.au [203.31.238.37]) by hub.freebsd.org (Postfix) with ESMTP id 861FD37B4C5; Mon, 23 Oct 2000 05:37:04 -0700 (PDT) Received: by starbug.ugh.net.au (Postfix, from userid 1000) id BE5E2A842; Mon, 23 Oct 2000 23:36:58 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by starbug.ugh.net.au (Postfix) with ESMTP id BC4265454; Mon, 23 Oct 2000 22:36:58 +1000 (EST) Date: Mon, 23 Oct 2000 22:36:58 +1000 (EST) From: andrew@ugh.net.au To: ru@FreeBSD.org Cc: freebsd-bugs@FreeBSD.org Subject: Re: bin/22187: silence a warning from gcc when compiling finger In-Reply-To: <200010231221.FAA53252@freefall.freebsd.org> Message-ID: X-WonK: *wibble* MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Mon, 23 Oct 2000 ru@FreeBSD.org wrote: > Fixed, but why did you remove the (ch == ' ') test in your patch? From the description of the original PR: This patch also removes the test for ch being a space as that will already have been caught by isprint(ch) Its just for a tiny bit of efficiency. It should have no functional change. The idea is that if ch is a space then isprint(ch) will be true and the second half (the part after the ||) will never be executed. If we are in the part after the || we already know ch != ' ' so there is no point in testing it. Thanks, Andrew To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message