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/md5sum.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/md5sum.c') 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")); -- cgit v1.2.3-54-g00ecf