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/md5sum.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/md5sum.c')
-rw-r--r-- | src/md5sum.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/md5sum.c b/src/md5sum.c index 06a46bbce..e004c5e91 100644 --- a/src/md5sum.c +++ b/src/md5sum.c @@ -661,21 +661,21 @@ main (int argc, char **argv) usage (EXIT_FAILURE); } - if (status_only & !do_check) + if (status_only && !do_check) { error (0, 0, _("the --status option is meaningful only when verifying checksums")); usage (EXIT_FAILURE); } - if (warn & !do_check) + if (warn && !do_check) { error (0, 0, _("the --warn option is meaningful only when verifying checksums")); usage (EXIT_FAILURE); } - if (quiet & !do_check) + if (quiet && !do_check) { error (0, 0, _("the --quiet option is meaningful only when verifying checksums")); |