Date: Fri, 19 May 2000 21:39:30 -0400 (EDT) From: Brian Fundakowski Feldman <green@FreeBSD.org> To: Dag-Erling Smorgrav <des@flood.ping.uio.no> Cc: Hajimu UMEMOTO <ume@mahoroba.org>, arch@FreeBSD.ORG Subject: Re: fetch(1) Message-ID: <Pine.BSF.4.21.0005192130160.60567-100000@green.dyndns.org> In-Reply-To: <xzp7lcqho48.fsf@flood.ping.uio.no>
next in thread | previous in thread | raw e-mail | index | archive | help
On 19 May 2000, Dag-Erling Smorgrav wrote: > - for (p--, i = 0; i < 6; i++) { > - p++; /* skip the comma */ > + for (i = 0; *p, i < 6; i++, p++) > addr[i] = strtol(p, &p, 10); Right now with that change, the code will merrilly skip along addr[], setting the members to 0 and incrementing i to 6. While this is not especially harmful, you should probably fix the "*p, i < 6" which is precisely equivalent to "i < 6" to be "*p != '\0' && i < 6". -- Brian Fundakowski Feldman \ FreeBSD: The Power to Serve! / green@FreeBSD.org `------------------------------' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0005192130160.60567-100000>