Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Jun 2001 18:06:11 +0300
From:      Peter Pentchev <roam@orbitel.bg>
To:        Jonathan Lemon <jlemon@FreeBSD.org>
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>
In-Reply-To: <200106160640.f5G6e4J30312@freefall.freebsd.org>; from jlemon@FreeBSD.org on Fri, Jun 15, 2001 at 11:40:04PM -0700
References:  <200106160640.f5G6e4J30312@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010616180611.B1956>