]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
renice: make code more readable for static analyzer [coverity scan]
authorKarel Zak <kzak@redhat.com>
Tue, 28 May 2019 10:19:23 +0000 (12:19 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 28 May 2019 10:19:23 +0000 (12:19 +0200)
It seems coverity and clag have no clue about relation between argv[]
and argc. Let's make code more readable for them...

Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/renice.c

index 5efecdfd00b432137ced7540dedd338cc1539f68..fbce39a1f8f7755853bc4f570aa4575e3a64b942 100644 (file)
@@ -140,7 +140,7 @@ int main(int argc, char **argv)
                argv++;
        }
 
-       if (argc < 2) {
+       if (argc < 2 || !*argv) {
                warnx(_("not enough arguments"));
                errtryhelp(EXIT_FAILURE);
        }