From owner-freebsd-arch Fri May 19 18:39:35 2000 Delivered-To: freebsd-arch@freebsd.org Received: from localhost (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id E7CFE37B552; Fri, 19 May 2000 18:39:31 -0700 (PDT) (envelope-from green@FreeBSD.org) Date: Fri, 19 May 2000 21:39:30 -0400 (EDT) From: Brian Fundakowski Feldman X-Sender: green@green.dyndns.org To: Dag-Erling Smorgrav Cc: Hajimu UMEMOTO , arch@FreeBSD.ORG Subject: Re: fetch(1) In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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