]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - argp/argp-help.c
Avoid use of atoi in some places in libc
[thirdparty/glibc.git] / argp / argp-help.c
index 90a2795cefd2bdaf5a6c3efcb0ada20531b0611f..f7f1134c80193a719908d7ecaa317f4e093d1492 100644 (file)
@@ -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);
              }