diff options
author | Jorge Arellano Cid <jcid@dillo.org> | 2009-02-01 15:46:08 -0300 |
---|---|---|
committer | Jorge Arellano Cid <jcid@dillo.org> | 2009-02-01 15:46:08 -0300 |
commit | e26be9ffd737d51f6e9eb273a29014618edbd3b9 (patch) | |
tree | 1ec262bdea00487c8060e6c9a3cdb0ed9326f857 | |
parent | 0f8d3658489e2d68f8624df8465cbbc69fdf2327 (diff) |
s/atoi/strtol/g
-rw-r--r-- | dpi/https.c | 2 | ||||
-rw-r--r-- | src/cssparser.cc | 4 | ||||
-rw-r--r-- | src/prefs.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/dpi/https.c b/dpi/https.c index 294dc332..c90c4a40 100644 --- a/dpi/https.c +++ b/dpi/https.c @@ -308,7 +308,7 @@ static int get_network_connection(char * url) /*Check for port number*/ if (strchr(url+url_offset, ':') == (url + url_offset + url_look_up_length)){ - portnum = atoi(url + url_offset + url_look_up_length + 1); + portnum = strtol(url + url_offset + url_look_up_length + 1, NULL, 10); } } else { url_look_up = url + url_offset; 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); |