From 68d80ce7768fd097863c53a88de5385748e121a6 Mon Sep 17 00:00:00 2001 From: Todd Swatling Date: Tue, 18 Apr 2017 19:28:50 -0400 Subject: [PATCH] based on output from shellcheck "SC2155: Declare and assign separately to avoid masking return values." --- testssl.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/testssl.sh b/testssl.sh index c7039b1..9bba8c9 100755 --- a/testssl.sh +++ b/testssl.sh @@ -762,7 +762,8 @@ fileout() { local hint="$6" if ( "$do_pretty_json" && [[ "$1" == "service" ]] ) || show_finding "$severity"; then - local finding=$(strip_lf "$(newline_to_spaces "$(strip_quote "$3")")") + local finding + finding=$(strip_lf "$(newline_to_spaces "$(strip_quote "$3")")") [[ -f "$JSONFILE" ]] && (fileout_json_finding "$1" "$severity" "$finding" "$cve" "$cwe" "$hint") "$do_csv" && \ echo -e \""$1\"",\"$NODE/$NODEIP\",\"$PORT"\",\""$severity"\",\""$finding"\",\""$cve"\",\""$cwe"\",\""$hint"\"" >> "$CSVFILE"