On 07/05/10 08:29, Jeff Squyres wrote: > So if hwloc_snprintf() returns 0, how do you know if you > got a zero-length string or an error?
The GNU libc manual page for snprintf() et. al says: If an output error is encountered, a negative value is returned. So I'd have thought that a negative value should be returned if we abort due to not being to allocate enough memory. cheers, Chris -- Christopher Samuel - Senior Systems Administrator VLSCI - Victorian Life Sciences Computational Initiative Email: sam...@unimelb.edu.au Phone: +61 (0)3 903 55545 http://www.vlsci.unimelb.edu.au/