From: Stefano Lattarini Date: Thu, 18 Oct 2012 10:47:17 +0000 (+0200) Subject: depcomp: be more idiomatic in checking for zero exit statuses X-Git-Tag: v1.12b~13^2~19 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=883723873c94bdd3a9a3c9a376e3b2b266db5ca3;p=platform%2Fupstream%2Fautomake.git depcomp: be more idiomatic in checking for zero exit statuses * lib/depcomp: Prefer "if test $stat -ne 0; then ..." over the longer "if test $stat -eq 0; then :; else ...". Signed-off-by: Stefano Lattarini --- diff --git a/lib/depcomp b/lib/depcomp index e1f51f4..dfc97de 100755 --- a/lib/depcomp +++ b/lib/depcomp @@ -1,7 +1,7 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2012-07-12.20; # UTC +scriptversion=2012-10-18.11; # UTC # Copyright (C) 1999-2012 Free Software Foundation, Inc. @@ -136,8 +136,7 @@ gcc3) done "$@" stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi @@ -163,8 +162,7 @@ gcc) fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi @@ -206,8 +204,7 @@ sgi) "$@" -MDupdate "$tmpdepfile" fi stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi @@ -269,8 +266,7 @@ aix) fi stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi @@ -317,8 +313,7 @@ icc) # with horizontal tabulation characters. "$@" -MD -MF "$tmpdepfile" stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi @@ -434,8 +429,7 @@ hp2) "$@" +Maked fi stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi @@ -497,8 +491,7 @@ tru64) fi stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi @@ -525,8 +518,7 @@ msvc7) "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" - if test "$stat" = 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi