[PATCH v3] libio: Flush stream at freopen (BZ#21037)

Adhemerval Zanella adhemerval.zanella@linaro.org
Tue Oct 2 13:06:00 GMT 2018



On 02/10/2018 07:39, Florian Weimer wrote:
> * Adhemerval Zanella:
> 
>> diff --git a/libio/tst-memstream4.c b/libio/tst-memstream4.c
>> new file mode 100644
>> index 0000000000..bb2635e837
>> --- /dev/null
>> +++ b/libio/tst-memstream4.c
> 
>> +    //TEST_VERIFY (STRCMP (buf, W("new")) == 0);

Ugh, I will fix it.

> 
> This looks like a leftover.
> 
>> +    TEST_COMPARE_BLOB (buf, STRLEN (buf), W("new"), STRLEN (W ("new")));
> 
> I think you need STRLNE (buf) * sizeof (CHAR_T) here.
> 

Indeed, thanks for check on this.



More information about the Libc-alpha mailing list