[packages/rpm-build-tools] teeboth: check cheaper condition in && first

draenog draenog at pld-linux.org
Thu May 9 22:57:48 CEST 2013


commit 6cf543c0de6014f1c68765ba93399f45e14eaa81
Author: Kacper Kornet <draenog at pld-linux.org>
Date:   Thu May 9 21:56:21 2013 +0100

    teeboth: check cheaper condition in && first

 teeboth | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/teeboth b/teeboth
index 0612d64..5c3f5c0 100755
--- a/teeboth
+++ b/teeboth
@@ -55,7 +55,7 @@ while ( $alive ) {
 	foreach my $h ( $select->can_read() ) {
 		sysread $h, $_, 1024;
 		print $fout $_ if $fout;
-		if ( $h == \*child_err && $interactive ) {
+		if ( $interactive && $h == \*child_err ) {
 			print "\033[31m$_\033[0m";
 		} else {
 			print $_;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpm-build-tools.git/commitdiff/6cf543c0de6014f1c68765ba93399f45e14eaa81



More information about the pld-cvs-commit mailing list