diff options
author | Pádraig Brady <P@draigBrady.com> | 2009-09-23 10:10:51 +0100 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2009-09-23 14:33:40 +0100 |
commit | a037e838e15c9a698f1634398e0fe2726398d575 (patch) | |
tree | 7361ac5f2c3dbd8fc4763e6fa960e6646670dc79 /src/tail.c | |
parent | ade8dd2096e1898edefadf2314d4e1ec654adda5 (diff) | |
download | coreutils-a037e838e15c9a698f1634398e0fe2726398d575.tar.xz |
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)
Diffstat (limited to 'src/tail.c')
-rw-r--r-- | src/tail.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tail.c b/src/tail.c index 3eb27dbd2..f9f8c3904 100644 --- a/src/tail.c +++ b/src/tail.c @@ -1126,7 +1126,7 @@ tail_forever (struct File_spec *f, size_t n_files, double sleep_interval) break; } - if ((!any_input | blocking) && fflush (stdout) != 0) + if ((!any_input || blocking) && fflush (stdout) != 0) error (EXIT_FAILURE, errno, _("write error")); /* If nothing was read, sleep and/or check for dead writers. */ |