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
0ea3e2f0ed
commit
e4aad0a9c4
|
@ -22,6 +22,7 @@
|
||||||
#include "nls.h"
|
#include "nls.h"
|
||||||
#include "closestream.h"
|
#include "closestream.h"
|
||||||
#include "timeutils.h"
|
#include "timeutils.h"
|
||||||
|
#include "strutils.h"
|
||||||
|
|
||||||
#include "ipcutils.h"
|
#include "ipcutils.h"
|
||||||
|
|
||||||
|
@ -120,7 +121,7 @@ int main (int argc, char **argv)
|
||||||
while ((opt = getopt_long(argc, argv, options, longopts, NULL)) != -1) {
|
while ((opt = getopt_long(argc, argv, options, longopts, NULL)) != -1) {
|
||||||
switch (opt) {
|
switch (opt) {
|
||||||
case 'i':
|
case 'i':
|
||||||
id = atoi (optarg);
|
id = strtos32_or_err(optarg, _("failed to parse id argument"));
|
||||||
specific = 1;
|
specific = 1;
|
||||||
break;
|
break;
|
||||||
case 'a':
|
case 'a':
|
||||||
|
|
Loading…
Reference in New Issue