From a037e838e15c9a698f1634398e0fe2726398d575 Mon Sep 17 00:00:00 2001 From: Pádraig Brady Date: Wed, 23 Sep 2009 10:10:51 +0100 Subject: maint: Use logical rather than bitwise operators on bools This is because bitwise operators are: - confusing and inconsistent in a boolean context - non short circuiting - brittle in C89 where bool can be an int (so > 1) --- src/od.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/od.c') diff --git a/src/od.c b/src/od.c index 2682857f3..ef8883040 100644 --- a/src/od.c +++ b/src/od.c @@ -878,7 +878,7 @@ open_next_file (void) } while (in_stream == NULL); - if (limit_bytes_to_format & !flag_dump_strings) + if (limit_bytes_to_format && !flag_dump_strings) setvbuf (in_stream, NULL, _IONBF, 0); return ok; @@ -1742,7 +1742,7 @@ it must be one character from [doxn]"), od [file] [[+]offset[.][b]] */ - if (!modern | traditional) + if (!modern || traditional) { uintmax_t o1; uintmax_t o2; -- cgit v1.2.3-54-g00ecf