From: Karel Zak Date: Tue, 28 May 2019 10:19:23 +0000 (+0200) Subject: renice: make code more readable for static analyzer [coverity scan] X-Git-Tag: v2.34-rc2~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9f74aa07d4d09ba45cce3fea36e9447a3e96ae8c;p=thirdparty%2Futil-linux.git renice: make code more readable for static analyzer [coverity scan] 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 --- diff --git a/sys-utils/renice.c b/sys-utils/renice.c index 5efecdfd00..fbce39a1f8 100644 --- a/sys-utils/renice.c +++ b/sys-utils/renice.c @@ -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); }