Open MPI logo

Hardware Locality Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Hardware Locality Development mailing list

Subject: Re: [hwloc-devel] [hwloc-svn] svn:hwloc r2083
From: Christopher Samuel (samuel_at_[hidden])
Date: 2010-05-07 12:49:50

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.


  Christopher Samuel - Senior Systems Administrator
  VLSCI - Victorian Life Sciences Computational Initiative
  Email: samuel_at_[hidden] Phone: +61 (0)3 903 55545