From 90ac19cfe807697656bb1cae076e3754c8ad7c09 Mon Sep 17 00:00:00 2001 From: Richard Soderberg Date: Sat, 5 Sep 2015 03:27:00 -0700 Subject: [PATCH] Replace an instance of string-ish [[ $? -gt 0 ]] with arithmetic (( $? != 0 )). This more accurately reflects that "non-zero exit status indicates failure"; while > 0 will no doubt work as well, != 0 avoids the question of whether $? is signed or unsigned in bash and more accurately represents the documentation ("non-zero", != 0). --- cipherscan | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cipherscan b/cipherscan index e195d21..1b1126a 100755 --- a/cipherscan +++ b/cipherscan @@ -633,7 +633,7 @@ bench_cipher() { for i in $(seq 1 $BENCHMARKITER); do debug Connection $i (echo "Q" | $sslcommand 2>/dev/null 1>/dev/null) - if [[ $? -gt 0 ]]; then + if (( $? != 0 )); then break fi done