From owner-cvs-all Sat Jun 16 8: 7:48 2001 Delivered-To: cvs-all@freebsd.org Received: from ringworld.nanolink.com (diskworld.nanolink.com [195.24.48.189]) by hub.freebsd.org (Postfix) with SMTP id CD0E637B401 for ; Sat, 16 Jun 2001 08:07:40 -0700 (PDT) (envelope-from roam@orbitel.bg) Received: (qmail 6440 invoked by uid 1000); 16 Jun 2001 15:06:11 -0000 Date: Sat, 16 Jun 2001 18:06:11 +0300 From: Peter Pentchev To: Jonathan Lemon Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.sbin/rarpd rarpd.c Message-ID: <20010616180611.B1956@ringworld.oblivion.bg> Mail-Followup-To: Jonathan Lemon , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org References: <200106160640.f5G6e4J30312@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200106160640.f5G6e4J30312@freefall.freebsd.org>; from jlemon@FreeBSD.org on Fri, Jun 15, 2001 at 11:40:04PM -0700 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, Jun 15, 2001 at 11:40:04PM -0700, Jonathan Lemon wrote: > jlemon 2001/06/15 23:40:04 PDT > > Modified files: > usr.sbin/rarpd rarpd.c > Log: > Undo last braino and fix properly. I somewhat fail to see how this is a proper fix. 'len' is u_int, sizeof is size_t, both are unsigned types. You've left len as-is, casted the sizeof to (int), and printed both as signed ints. Wouldn't it be at least more semantically correct to print unsigned values as unsigned (%u)? True, with the packet sizes that rarpd operates on, it is highly unlikely that this signedness would do Bad Things(tm) (it would have to receive a > 2GB packet on x86, and my mind boggles when things come to the Alpha ;), but still, it seems bogus to me to cast an unsigned value to int, just to avoid a (correct) %d -> %u change in the format string. G'luck, Peter -- This sentence contradicts itself - or rather - well, no, actually it doesn't! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message