aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJorge Arellano Cid <jcid@dillo.org>2009-02-01 15:46:08 -0300
committerJorge Arellano Cid <jcid@dillo.org>2009-02-01 15:46:08 -0300
commite26be9ffd737d51f6e9eb273a29014618edbd3b9 (patch)
tree1ec262bdea00487c8060e6c9a3cdb0ed9326f857 /src
parent0f8d3658489e2d68f8624df8465cbbc69fdf2327 (diff)
s/atoi/strtol/g
Diffstat (limited to 'src')
-rw-r--r--src/cssparser.cc4
-rw-r--r--src/prefs.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/cssparser.cc b/src/cssparser.cc
index 5a45ec3b..9f0a457f 100644
--- a/src/cssparser.cc
+++ b/src/cssparser.cc
@@ -594,7 +594,7 @@ static bool Css_token_matches_property(CssParser * parser,
case CSS_TYPE_FONT_WEIGHT:
if (parser->ttype == CSS_TK_DECINT) {
- i = atoi(parser->tval);
+ i = strtol(parser->tval, NULL, 10);
return i >= 100 && i <= 900;
} else
return (parser->ttype == CSS_TK_SYMBOL &&
@@ -750,7 +750,7 @@ static bool Css_parse_value(CssParser * parser,
case CSS_TYPE_FONT_WEIGHT:
ival = 0;
if (parser->ttype == CSS_TK_DECINT) {
- ival = atoi(parser->tval);
+ ival = strtol(parser->tval, NULL, 10);
if (ival < 100 || ival > 900)
/* invalid */
ival = 0;
diff --git a/src/prefs.c b/src/prefs.c
index f81a51eb..f40c1a57 100644
--- a/src/prefs.c
+++ b/src/prefs.c
@@ -117,7 +117,7 @@ static int Prefs_parse_pair(char *name, char *value, const SymNode_t *symbols,
*(DilloUrl **)node->pref = a_Url_new(value, NULL);
break;
case PREFS_INT32:
- *(int32_t *)node->pref = atoi(value);
+ *(int32_t *)node->pref = strtol(value, NULL, 10);
break;
case PREFS_DOUBLE:
*(double *)node->pref = strtod(value, NULL);