Date: Wed, 11 Sep 2002 14:13:45 -0400 (EDT) From: John Baldwin <jhb@FreeBSD.org> To: Mike Barcroft <mike@FreeBSD.org> Cc: Kimura Fuyuki <fuyuki@hadaly.org>, fanf@FreeBSD.ORG, cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/usr.bin/uudecode uudecode.c Message-ID: <XFMail.20020911141345.jhb@FreeBSD.org> In-Reply-To: <20020911134716.A84338@espresso.q9media.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 11-Sep-2002 Mike Barcroft wrote: > John Baldwin <jhb@FreeBSD.org> writes: >> >> On 11-Sep-2002 Mike Barcroft wrote: >> > Kimura Fuyuki <fuyuki@hadaly.org> writes: >> >> `n' can be minus... >> >> >> >> Index: uudecode.c >> >> =================================================================== >> >> RCS file: /home/ncvs/src/usr.bin/uudecode/uudecode.c,v >> >> retrieving revision 1.39 >> >> diff -u -r1.39 uudecode.c >> >> --- uudecode.c 11 Sep 2002 01:00:56 -0000 1.39 >> >> +++ uudecode.c 11 Sep 2002 02:59:47 -0000 >> >> @@ -153,7 +153,7 @@ >> >> decode2(void) >> >> { >> >> int base64; >> >> - size_t n; >> >> + int n; >> >> char ch, *p, *q; >> >> void *mode; >> >> struct passwd *pw; >> >> >> > >> > Unfortunately this wasn't good enough since most uses of n needed to >> > be size_t. I've added a new variable to cope. It seems to build >> > share, so hopefully world is unbroken again. Thanks for the pointer. >> > I thought I checked all the uses of n, but didn't notice the last few. >> >> Erm, ssize_t? > > That's hackish to cram two unrelated temporary variables into one. It > wouldn't be bad if they both needed to be the same type, but in this > case there are really two separate needs for two separate types. > Also, using ssize_t would require at least one additional cast to > avoid a signed unsigned comparison. Ah, didn't realize it was being overloaded for two different things. -- John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ 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?XFMail.20020911141345.jhb>