O-Saft icon indicating copy to clipboard operation
O-Saft copied to clipboard

Use another variable assignment with a combined operator

Open elfring opened this issue 4 years ago • 0 comments

:eyes: Some source code analysis tools can help to find opportunities for improving software components. :thought_balloon: I propose to increase the usage of combined operators accordingly.

diff --git a/checkAllCiphers.pl b/checkAllCiphers.pl
index 89704cc..82d2144 100755
--- a/checkAllCiphers.pl
+++ b/checkAllCiphers.pl
@@ -264,7 +264,7 @@ while ($#argv >= 0) {
     if ($arg =~ /^--trace([_-]?cmd)$/i)                 { $cfg{'traceCMD'}++;    next; } # ..
     if ($arg =~ /^--trace(@|[_-]?key)$/i)               { $cfg{'traceKEY'}++;    next; } # ..
     if ($arg =~ /^--trace=(\d+)$/i)                     { $cfg{'trace'}    = $1; next; }
-    if ($arg =~ /^--trace([_-]?time)$/i)                { $cfg{'traceTIME'}++;   $cfg{'trace'} = $cfg{'trace'}||1; next; } # Timestamp on; trace on if it was off
+    if ($arg =~ /^--trace([_-]?time)$/i)                { $cfg{'traceTIME'}++;   $cfg{'trace'} ||= 1; next; } # Timestamp on; trace on if it was off
     if ($arg =~ /^--?p(?:ort)?=(\d+)$/i)                { $cfg{'port'}     = $1; next; }
     if ($arg =~ /^--?h(?:ost)?=(.+)$/i)                 { push(@{$cfg{'hosts'}}, $1 . ":" . ($cfg{'port'}||443)); next; }     
     # proxy options

elfring avatar Nov 27 '21 13:11 elfring