[Xorp-cvs] XORP cvs commit: xorp xorp/cli/libtecla xorp/fea xorp/libxorp xorp/utils/flower_malloc

Pavlin Radoslavov pavlin at icir.org
Fri Apr 20 16:44:04 PDT 2007


Bruce M. Simpson <bms at icir.org> wrote:

> Pavlin Radoslavov wrote:
> > Log message:
> > 	Replaced sprintf() with snprintf() because the latter is safer.
> >   
> 
> Be careful - the snprintf() implementation on Windows has a different 
> return value from that defined by POSIX. This caused me hours of 
> consternation when first bringing up XRL on Windows.
> 
> BMS

Can you elaborate about the particular difference?

BTW, all the changes with this particular commit don't consider the
return value so we shouldn't see a problem on Windows.

Indeed, the independently-updated local libxorp/inet_ntop.c
implementation (from OpenBSD) considers the return value of
snprintf(), but from what I can see the way
"#ifndef HAVE_C99_SNPRINTF" is handled inside libxorp/c_format.cc,
the libxorp/inet_ntop.c handling of snprintf() should be fine.

Thanks,
Pavlin



More information about the Xorp-cvs mailing list