> Uh, snprintf() only returns 0 if the result string
> was empty.  Surely you'll
> return the number of bytes in the string (whether it
> fits or not), to
> match snprintf(), strlcpy(), etc.?

Indeed you're right ! It must have been my imagination ...
It does return 0 only if the string is empty, and then len otherwise. 
snprintf() function returns the  number  of  bytes  that  would  have  been  
written  to buffer if buf_len had been sufficiently large (excluding the 
terminating null byte.), so does humanize_number().

Cheers

Yann
This message posted from opensolaris.org
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to