aboutsummaryrefslogtreecommitdiff
path: root/argp
diff options
context:
space:
mode:
Diffstat (limited to 'argp')
-rw-r--r--argp/argp-help.c6
-rw-r--r--argp/argp-parse.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/argp/argp-help.c b/argp/argp-help.c
index 90a2795..f7f1134c 100644
--- a/argp/argp-help.c
+++ b/argp/argp-help.c
@@ -210,9 +210,9 @@ fill_in_uparams (const struct argp_state *state)
}
else if (isdigit ((unsigned char) *arg))
{
- val = atoi (arg);
- while (isdigit ((unsigned char) *arg))
- arg++;
+ char *ep;
+ val = strtol (arg, &ep, 10);
+ arg = ep;
SKIPWS (arg);
}
diff --git a/argp/argp-parse.c b/argp/argp-parse.c
index 68dc454..1533b43 100644
--- a/argp/argp-parse.c
+++ b/argp/argp-parse.c
@@ -147,7 +147,7 @@ argp_default_parser (int key, char *arg, struct argp_state *state)
break;
case OPT_HANG:
- _argp_hang = atoi (arg ? arg : "3600");
+ _argp_hang = arg ? strtol (arg, NULL, 10) : 3600;
while (_argp_hang-- > 0)
__sleep (1);
break;