[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/2] open_memstream-tests: new module
From: |
Eric Blake |
Subject: |
Re: [PATCH 1/2] open_memstream-tests: new module |
Date: |
Fri, 23 Apr 2010 17:30:53 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Lightning/1.0b1 Thunderbird/3.0.4 |
On 04/23/2010 05:21 PM, Paul Eggert wrote:
> Eric Blake <address@hidden> 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 address@hidden +1-801-349-2682
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- work in progress: [PATCH 0/2+] open_memstream, Eric Blake, 2010/04/23
- [PATCH 1/2] open_memstream-tests: new module, Eric Blake, 2010/04/23
- [PATCH 2/2] open_memstream: new module, Eric Blake, 2010/04/23
- Re: work in progress: [PATCH 0/2+] open_memstream, Jim Meyering, 2010/04/24
- Re: extended streams, Bruno Haible, 2010/04/24
- Re: work in progress: [PATCH 0/2+] open_memstream, Paolo Bonzini, 2010/04/26