]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
ipcmk: fix strtoul use, remove deadcode [coverity scan]
authorKarel Zak <kzak@redhat.com>
Wed, 18 Aug 2021 08:38:52 +0000 (10:38 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 18 Aug 2021 08:38:52 +0000 (10:38 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/ipcmk.c

index d6e5ce6c982a02c4f0d3ac526c24ee9e02466471..9c1f60868c3da996c2c1da7950ca46252dc51978 100644 (file)
@@ -125,7 +125,7 @@ int main(int argc, char **argv)
                {
                        char *end = NULL;
                        errno = 0;
-                       permission = strtoul(optarg, NULL, 8);
+                       permission = strtoul(optarg, &end, 8);
                        if (errno || optarg == end || (end && *end))
                                err(EXIT_FAILURE, _("failed to parse mode"));
                        break;