summaryrefslogtreecommitdiffstats
path: root/sys-utils/ipcmk.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys-utils/ipcmk.c')
-rw-r--r--sys-utils/ipcmk.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys-utils/ipcmk.c b/sys-utils/ipcmk.c
index 50ad79405..923e2dd47 100644
--- a/sys-utils/ipcmk.c
+++ b/sys-utils/ipcmk.c
@@ -35,6 +35,7 @@
#include "nls.h"
#include "c.h"
+#include "strutils.h"
key_t createKey(void)
{
@@ -102,14 +103,14 @@ int main(int argc, char **argv)
while((opt = getopt_long(argc, argv, "hM:QS:p:Vh", longopts, NULL)) != -1) {
switch(opt) {
case 'M':
- size = atoi(optarg);
+ size = strtol_or_err(optarg, _("failed to parse size"));
doShm = 1;
break;
case 'Q':
doMsg = 1;
break;
case 'S':
- nsems = atoi(optarg);
+ nsems = strtol_or_err(optarg, _("failed to parse elements"));
doSem = 1;
break;
case 'p':