This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch master updated. glibc-2.21-571-g2e42502
- From: siddhesh at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 8 Jul 2015 09:59:23 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.21-571-g2e42502
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via 2e4250225cf894e11c926007698cea8096a372fb (commit)
from 808696696837b8b8fc858f2e6f8d4e40e26e1308 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2e4250225cf894e11c926007698cea8096a372fb
commit 2e4250225cf894e11c926007698cea8096a372fb
Author: Feng Gao <gfree.wind@gmail.com>
Date: Wed Jul 8 13:40:50 2015 +0530
Use "|" instead of "+" when combine the _IO_LINE_BUF and _IO_UNBUFFERED flags
Both of "_IO_UNBUFFERED" and "_IO_LINE_BUF" are the bit flags, but I
find there are some codes looks like "_IO_LINE_BUF+_IO_UNBUFFERED",
while some codes are "_IO_LINE_BUF|_IO_UNBUFFERED".
I think the former is not good, even though the final result is same.
diff --git a/ChangeLog b/ChangeLog
index 3a5cfee..07dc773 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2015-07-08 Feng Gao <gfree.wind@gmail.com>
+
+ * libio/fileops.c: Use "|" instead of "+" when combine _IO_LINE_BUF
+ and _IO_UNBUFFERED.
+ * libio/oldfileops.c: Likewise.
+ * libio/wfileops.c: Likewise.
+
2015-07-08 Mike Frysinger <vapier@gentoo.org>
* nscd/selinux.c: Delete selinux/flask.h include.
diff --git a/libio/fileops.c b/libio/fileops.c
index 9668024..cbcd6f5 100644
--- a/libio/fileops.c
+++ b/libio/fileops.c
@@ -521,7 +521,7 @@ new_do_write (_IO_FILE *fp, const char *data, _IO_size_t to_do)
_IO_setg (fp, fp->_IO_buf_base, fp->_IO_buf_base, fp->_IO_buf_base);
fp->_IO_write_base = fp->_IO_write_ptr = fp->_IO_buf_base;
fp->_IO_write_end = (fp->_mode <= 0
- && (fp->_flags & (_IO_LINE_BUF+_IO_UNBUFFERED))
+ && (fp->_flags & (_IO_LINE_BUF | _IO_UNBUFFERED))
? fp->_IO_buf_base : fp->_IO_buf_end);
return count;
}
@@ -844,7 +844,7 @@ _IO_new_file_overflow (_IO_FILE *f, int ch)
f->_IO_read_base = f->_IO_read_ptr = f->_IO_read_end;
f->_flags |= _IO_CURRENTLY_PUTTING;
- if (f->_mode <= 0 && f->_flags & (_IO_LINE_BUF+_IO_UNBUFFERED))
+ if (f->_mode <= 0 && f->_flags & (_IO_LINE_BUF | _IO_UNBUFFERED))
f->_IO_write_end = f->_IO_write_ptr;
}
if (ch == EOF)
diff --git a/libio/oldfileops.c b/libio/oldfileops.c
index 84939e3..54789b2 100644
--- a/libio/oldfileops.c
+++ b/libio/oldfileops.c
@@ -313,7 +313,7 @@ old_do_write (fp, data, to_do)
fp->_cur_column = _IO_adjust_column (fp->_cur_column - 1, data, count) + 1;
_IO_setg (fp, fp->_IO_buf_base, fp->_IO_buf_base, fp->_IO_buf_base);
fp->_IO_write_base = fp->_IO_write_ptr = fp->_IO_buf_base;
- fp->_IO_write_end = ((fp->_flags & (_IO_LINE_BUF+_IO_UNBUFFERED))
+ fp->_IO_write_end = ((fp->_flags & (_IO_LINE_BUF | _IO_UNBUFFERED))
? fp->_IO_buf_base : fp->_IO_buf_end);
return count;
}
@@ -418,7 +418,7 @@ _IO_old_file_overflow (f, ch)
f->_IO_write_end = f->_IO_buf_end;
f->_IO_read_base = f->_IO_read_ptr = f->_IO_read_end;
- if (f->_flags & (_IO_LINE_BUF+_IO_UNBUFFERED))
+ if (f->_flags & (_IO_LINE_BUF | _IO_UNBUFFERED))
f->_IO_write_end = f->_IO_write_ptr;
f->_flags |= _IO_CURRENTLY_PUTTING;
}
diff --git a/libio/wfileops.c b/libio/wfileops.c
index 73d7709..99f9c8f 100644
--- a/libio/wfileops.c
+++ b/libio/wfileops.c
@@ -118,7 +118,7 @@ _IO_wdo_write (_IO_FILE *fp, const wchar_t *data, _IO_size_t to_do)
fp->_wide_data->_IO_buf_base);
fp->_wide_data->_IO_write_base = fp->_wide_data->_IO_write_ptr
= fp->_wide_data->_IO_buf_base;
- fp->_wide_data->_IO_write_end = ((fp->_flags & (_IO_LINE_BUF+_IO_UNBUFFERED))
+ fp->_wide_data->_IO_write_end = ((fp->_flags & (_IO_LINE_BUF | _IO_UNBUFFERED))
? fp->_wide_data->_IO_buf_base
: fp->_wide_data->_IO_buf_end);
@@ -216,7 +216,7 @@ _IO_wfile_underflow (_IO_FILE *fp)
/* Flush all line buffered files before reading. */
/* FIXME This can/should be moved to genops ?? */
- if (fp->_flags & (_IO_LINE_BUF|_IO_UNBUFFERED))
+ if (fp->_flags & (_IO_LINE_BUF | _IO_UNBUFFERED))
{
#if 0
_IO_flush_all_linebuffered ();
@@ -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)
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 7 +++++++
libio/fileops.c | 4 ++--
libio/oldfileops.c | 4 ++--
libio/wfileops.c | 6 +++---
4 files changed, 14 insertions(+), 7 deletions(-)
hooks/post-receive
--
GNU C Library master sources