ipcs: do not use atoi()
Addresses: https://github.com/karelzak/util-linux/issues/1358 Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
a1b3e2ec9d
commit
70bce9b32f
|
@ -22,6 +22,7 @@
|
|||
#include "nls.h"
|
||||
#include "closestream.h"
|
||||
#include "timeutils.h"
|
||||
#include "strutils.h"
|
||||
|
||||
#include "ipcutils.h"
|
||||
|
||||
|
@ -120,7 +121,7 @@ int main (int argc, char **argv)
|
|||
while ((opt = getopt_long(argc, argv, options, longopts, NULL)) != -1) {
|
||||
switch (opt) {
|
||||
case 'i':
|
||||
id = atoi (optarg);
|
||||
id = strtos32_or_err(optarg, _("failed to parse id argument"));
|
||||
specific = 1;
|
||||
break;
|
||||
case 'a':
|
||||
|
|
Loading…
Reference in New Issue