summaryrefslogtreecommitdiffstats
path: root/sys-utils
diff options
context:
space:
mode:
authorKarel Zak2019-05-28 12:19:23 +0200
committerKarel Zak2019-05-28 12:19:23 +0200
commit9f74aa07d4d09ba45cce3fea36e9447a3e96ae8c (patch)
tree14ed012d5602a84ff32d8317f113edef6431b3c1 /sys-utils
parentreadprofile: be more explicit with used types [cppcheck] (diff)
downloadkernel-qcow2-util-linux-9f74aa07d4d09ba45cce3fea36e9447a3e96ae8c.tar.gz
kernel-qcow2-util-linux-9f74aa07d4d09ba45cce3fea36e9447a3e96ae8c.tar.xz
kernel-qcow2-util-linux-9f74aa07d4d09ba45cce3fea36e9447a3e96ae8c.zip
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 <kzak@redhat.com>
Diffstat (limited to 'sys-utils')
-rw-r--r--sys-utils/renice.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys-utils/renice.c b/sys-utils/renice.c
index 5efecdfd0..fbce39a1f 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);
}