ipcmk: fix strtoul use, remove deadcode [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2021-08-18 10:38:52 +02:00
parent 987afa1a5f
commit 463e96d0bf
1 changed files with 1 additions and 1 deletions

View 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;