On 04/23/2010 05:21 PM, Paul Eggert wrote: > Eric Blake <ebl...@redhat.com> writes: > >> + ASSERT (STREQ (buf, "hello my world")); >> + ASSERT (len = strlen (buf)); > > These two tests, plus some others, assume that open_memstream allocates > a buffer in which the output is NUL-terminated. This isn't a portable > assumption (though it is often true, which I expect is why the tests > passed in your case).
POSIX 2008 requires that it be true. -- Eric Blake ebl...@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature