aboutsummaryrefslogtreecommitdiff
path: root/resolv/res_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'resolv/res_init.c')
-rw-r--r--resolv/res_init.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/resolv/res_init.c b/resolv/res_init.c
index 2c0bea6..61b958a 100644
--- a/resolv/res_init.c
+++ b/resolv/res_init.c
@@ -654,7 +654,7 @@ res_setoptions (struct resolv_conf_parser *parser, const char *options)
/* Search for and process individual options. */
if (!strncmp (cp, "ndots:", sizeof ("ndots:") - 1))
{
- int i = atoi (cp + sizeof ("ndots:") - 1);
+ int i = strtol (cp + sizeof ("ndots:") - 1, NULL, 10);
if (i <= RES_MAXNDOTS)
parser->template.ndots = i;
else
@@ -662,7 +662,7 @@ res_setoptions (struct resolv_conf_parser *parser, const char *options)
}
else if (!strncmp (cp, "timeout:", sizeof ("timeout:") - 1))
{
- int i = atoi (cp + sizeof ("timeout:") - 1);
+ int i = strtol (cp + sizeof ("timeout:") - 1, NULL, 10);
if (i <= RES_MAXRETRANS)
parser->template.retrans = i;
else
@@ -670,7 +670,7 @@ res_setoptions (struct resolv_conf_parser *parser, const char *options)
}
else if (!strncmp (cp, "attempts:", sizeof ("attempts:") - 1))
{
- int i = atoi (cp + sizeof ("attempts:") - 1);
+ int i = strtol (cp + sizeof ("attempts:") - 1, NULL, 10);
if (i <= RES_MAXRETRY)
parser->template.retry = i;
else