From owner-freebsd-hackers Fri Aug 21 19:31:24 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id TAA09901 for freebsd-hackers-outgoing; Fri, 21 Aug 1998 19:31:24 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from nexus.astro.psu.edu (nexus.astro.psu.edu [128.118.147.20]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id TAA09893 for ; Fri, 21 Aug 1998 19:31:19 -0700 (PDT) (envelope-from mph@astro.psu.edu) Received: from mstar.astro.psu.edu by nexus.astro.psu.edu (4.1/Nexus-1.3) id AA08316; Fri, 21 Aug 98 22:30:43 EDT Received: by mstar.astro.psu.edu (SMI-8.6/Client-1.3) id WAA13436; Fri, 21 Aug 1998 22:30:37 -0400 Message-Id: <19980821223036.A13406@astro.psu.edu> Date: Fri, 21 Aug 1998 22:30:36 -0400 From: Matthew Hunt To: Phil Gilley , freebsd-hackers@FreeBSD.ORG Subject: Re: Stupidity or compiler bug? References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93i In-Reply-To: ; from Phil Gilley on Fri, Aug 21, 1998 at 08:50:37PM -0500 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, Aug 21, 1998 at 08:50:37PM -0500, Phil Gilley wrote: > printf("%s %s\n", inet_ntoa(iph.ip_src), inet_ntoa(iph.ip_dst)); I haven't looked at the source, but this is an educated guess: You cannot do that. inet_ntoa(3) presumably uses the same buffer to store each result; if you want to keep multiple results, you need to copy at least one into your own buffer. -- Matthew Hunt * Inertia is a property of matter. http://www.pobox.com/~mph/pgp.key for PGP public key 0x67203349. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message