bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#23713: [PATCH 2/6] maint: replace bitwise with logical OR


From: Zev Weiss
Subject: bug#23713: [PATCH 2/6] maint: replace bitwise with logical OR
Date: Tue, 7 Jun 2016 01:37:39 -0500

* src/grep.c (main): replace bitwise ORs with logical ORs where it
makes sense (when dealing with boolean conditions as opposed to
bitmasks).
---
 src/grep.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/grep.c b/src/grep.c
index d812bae..9776507 100644
--- a/src/grep.c
+++ b/src/grep.c
@@ -2623,12 +2623,12 @@ main (int argc, char **argv)
      implementation, -q overrides -l and -L, which in turn override -c.  */
   if (exit_on_match)
     list_files = 0;
-  if (exit_on_match | list_files)
+  if (exit_on_match || list_files)
     {
       count_matches = false;
       done_on_match = true;
     }
-  out_quiet = count_matches | done_on_match;
+  out_quiet = count_matches || done_on_match;
 
   if (out_after < 0)
     out_after = default_context;
-- 
2.8.0.rc3






reply via email to

[Prev in Thread] Current Thread [Next in Thread]