From owner-cvs-all Sat Jun 16 9:10:17 2001 Delivered-To: cvs-all@freebsd.org Received: from prism.flugsvamp.com (cb58709-a.mdsn1.wi.home.com [24.17.241.9]) by hub.freebsd.org (Postfix) with ESMTP id 53D7B37B403; Sat, 16 Jun 2001 09:10:06 -0700 (PDT) (envelope-from jlemon@flugsvamp.com) Received: (from jlemon@localhost) by prism.flugsvamp.com (8.11.0/8.11.0) id f5GG9eA05986; Sat, 16 Jun 2001 11:09:40 -0500 (CDT) (envelope-from jlemon) Date: Sat, 16 Jun 2001 11:09:40 -0500 From: Jonathan Lemon To: Jonathan Lemon , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.sbin/rarpd rarpd.c Message-ID: <20010616110940.G68883@prism.flugsvamp.com> References: <200106160640.f5G6e4J30312@freefall.freebsd.org> <20010616180611.B1956@ringworld.oblivion.bg> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i In-Reply-To: <20010616180611.B1956@ringworld.oblivion.bg> 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 Sat, Jun 16, 2001 at 06:06:11PM +0300, Peter Pentchev wrote: > 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. Yes - sizeof() appears to be a 'long int' on the alpha, but an 'int' on the i386. printf("%d", sizeof(x)); produces the following warning on the alpha warning: int format, different type arg (arg 2) changing the format specifier to "%ld" fixes the warning, but then i386 complains: warning: long int format, int arg (arg 2) So my solution was simply to cast sizeof() to int. u_int will work too; the main thing here is to get the size to match on the alpha. -- Jonathan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message