This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v3] libio: Flush stream at freopen (BZ#21037)
- From: Florian Weimer <fw at deneb dot enyo dot de>
- To: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- Cc: libc-alpha at sourceware dot org
- Date: Tue, 02 Oct 2018 12:39:28 +0200
- Subject: Re: [PATCH v3] libio: Flush stream at freopen (BZ#21037)
- References: <20181001194322.4104-1-adhemerval.zanella@linaro.org>
* 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);
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.