[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Fix SC2015 warning



commit 4172b638b8221e2d56c20e2a408948977c68358a
Author: rl1987 <rl1987@xxxxxxxxxxxxxxxx>
Date:   Wed Apr 3 18:03:34 2019 +0300

    Fix SC2015 warning
---
 src/test/test_key_expiration.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/test/test_key_expiration.sh b/src/test/test_key_expiration.sh
index 8614a4fa4..1ed81c81c 100755
--- a/src/test/test_key_expiration.sh
+++ b/src/test/test_key_expiration.sh
@@ -47,7 +47,7 @@ dump() { xxd -p "$1" | tr -d '\n '; }
 die() { echo "$1" >&2 ; exit 5; }
 check_dir() { [ -d "$1" ] || die "$1 did not exist"; }
 check_file() { [ -e "$1" ] || die "$1 did not exist"; }
-check_no_file() { [ -e "$1" ] && die "$1 was not supposed to exist" || true; }
+check_no_file() { if [ -e "$1" ]; then die "$1 was not supposed to exist"; fi }
 check_files_eq() { cmp "$1" "$2" || die "$1 and $2 did not match: $(dump "$1") vs $(dump "$2")"; }
 check_keys_eq() { check_files_eq "${SRC}/keys/${1}" "${ME}/keys/${1}"; }
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits