[PATCH] Use "|" instead of "+" when combine the _IO_LINE_BUF and _IO_UNBUFFERED flags

Siddhesh Poyarekar siddhesh@redhat.com
Tue Jul 7 16:29:00 GMT 2015


On Wed, Jul 08, 2015 at 12:02:38AM +0800, Feng Gao wrote:
> About the tests, I did the following cases:
> 1. Write test codes to check if the (_IO_LINE_BUF|_IO_UNBUFFERED)
> equals  (_IO_LINE_BUF+_IO_UNBUFFERED);
> 2. Update the glibc to check if it works like before.

Thanks, it looks like you missed fixing spacing in the last instance
(quoted below).  Also, run 'make check' before and after the patch to
make sure that there are no regressions due to this change.  Updating
glibc is a brave thing to do - if it breaks, your box is a brick that
only a rescue disk can get back :)

Please post an updated patch and also let me know the results of your
test.

Thanks,
Siddhesh

> @@ -477,7 +477,7 @@ _IO_wfile_overflow (_IO_FILE *f, wint_t wch)
>        f->_IO_read_base = f->_IO_read_ptr = f->_IO_read_end;
>  
>        f->_flags |= _IO_CURRENTLY_PUTTING;
> -      if (f->_flags & (_IO_LINE_BUF+_IO_UNBUFFERED))
> +      if (f->_flags & (_IO_LINE_BUF|_IO_UNBUFFERED))
>  	f->_wide_data->_IO_write_end = f->_wide_data->_IO_write_ptr;
>      }
>    if (wch == WEOF)



More information about the Libc-alpha mailing list