]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxc/checkconfig: replace `! -z` by `-n` (SC2236)
authorSimon Deziel <simon.deziel@canonical.com>
Fri, 6 Oct 2023 04:24:08 +0000 (00:24 -0400)
committerSimon Deziel <simon.deziel@canonical.com>
Fri, 6 Oct 2023 05:43:17 +0000 (01:43 -0400)
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
src/lxc/cmd/lxc-checkconfig.in

index 63b042c4af678a4c5b925117589ae6cd59f01bf6..bb78d06f50ef16c1641f905662b05dd5f2d9a943 100755 (executable)
@@ -34,7 +34,7 @@ show_enabled() {
         $SETCOLOR_SUCCESS && echo -n "enabled" && $SETCOLOR_NORMAL
         RET=0
     else
-        if [ ! -z "$mandatory" ] && [ "$mandatory" = yes ]; then
+        if [ -n "$mandatory" ] && [ "$mandatory" = yes ]; then
             $SETCOLOR_FAILURE && echo -n "required" && $SETCOLOR_NORMAL
         else
             $SETCOLOR_WARNING && echo -n "missing" && $SETCOLOR_NORMAL