Re:

From: Louis A. Mamakos (louie_at_TransSys.COM)
Date: 11/30/03


To: "Ivo Vachkov" <ivo@bsdmail.org>
Date: Sun, 30 Nov 2003 11:30:50 -0500


The problem is in your test program; you're calling inet_ntoa() twice
in your printf() invocation, and the second call to inet_ntoa() overwrites
the static buffer that's returned.

louie

_______________________________________________
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"



Relevant Pages

  • Re: message buffering for logs, sprintf, etc...
    ... > printf() conversion mechanism). ... The size of buffer you need is the size of the format string, ... keep malloc() in reserve for big messages. ... print out an "out of memory" message using the static buffer. ...
    (comp.lang.c)
  • Re: query about printf
    ... version of printf uses a static buffer or a global buffer. ... In C there is no such thing as an "ISR" and there is only one ...
    (comp.lang.c)