bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: diffutils release imminent


From: Jim Meyering
Subject: Re: diffutils release imminent
Date: Wed, 10 Feb 2010 11:39:55 +0100

Andreas Schwab wrote:
> Mike Frysinger <address@hidden> writes:
>> On Friday 05 February 2010 06:30:47 Jim Meyering wrote:
>>> Mike Frysinger wrote:
>>> > Fedora also seems to have a trivial typo patch you'll probably want to
>>> > integrate:
>>> > --- diffutils-2.8.1/src/analyze.c.badc    2004-01-08 10:05:59.094598972

Thanks again.
Here's the proposed change:

>From 9f735dd16ab54550329f2fad357d816f7438e7d0 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Wed, 10 Feb 2010 11:37:23 +0100
Subject: [PATCH] maint: change use of "|" to more maintainable "||" (no 
semantic change)

* src/analyze.c (diff_2_files): Using the "||" operator happens to
be equivalent to using "|" in this case.  It is also clearer and
less prone to inadvertent bug introduction, in case the variable,
"changes" were ever to take on a value not in {0,1}.
Patch by Tim Waugh, via Mike Frysinger.
---
 src/analyze.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/analyze.c b/src/analyze.c
index 1288ea0..0a18334 100644
--- a/src/analyze.c
+++ b/src/analyze.c
@@ -633,7 +633,7 @@ diff_2_files (struct comparison *cmp)
        changes = briefly_report (changes, cmp->file);
       else
        {
-         if (changes | !no_diff_means_no_output)
+         if (changes || !no_diff_means_no_output)
            {
              /* Record info for starting up output,
                 to be used if and when we have some output to print.  */
--
1.7.0.rc2.170.gbc565




reply via email to

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