[PATCH 5/6] Remove mix of high and low-precedence booleans

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

 



Booleans such as &&, ||, ! have higher precedence than and, or, not.
They should not be mixed.

Signed-off-by: Bill Pemberton <wfp5p@xxxxxxxxxxxx>
---
 git-send-email.perl |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/git-send-email.perl b/git-send-email.perl
index c24e0df..5e7295d 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -471,14 +471,14 @@ while (defined(my $f = shift @ARGV)) {
 	if ($f eq "--") {
 		push @rev_list_opts, "--", @ARGV;
 		@ARGV = ();
-	} elsif (-d $f and !check_file_rev_conflict($f)) {
+	} elsif (-d $f && !check_file_rev_conflict($f)) {
 		opendir(DH,$f)
 			or die "Failed to opendir $f: $!";
 
 		push @files, grep { -f $_ } map { +$f . "/" . $_ }
 				sort readdir(DH);
 		closedir(DH);
-	} elsif ((-f $f or -p $f) and !check_file_rev_conflict($f)) {
+	} elsif ((-f $f || -p $f) && !check_file_rev_conflict($f)) {
 		push @files, $f;
 	} else {
 		push @rev_list_opts, $f;
@@ -632,7 +632,7 @@ sub ask {
 		if ($resp eq '' and defined $default) {
 			return $default;
 		}
-		if (!defined $valid_re or $resp =~ /$valid_re/) {
+		if (!defined $valid_re || $resp =~ /$valid_re/) {
 			return $resp;
 		}
 	}
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]