summaryrefslogtreecommitdiff
path: root/lib/cookie.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2010-11-28 23:11:14 +0100
committerYang Tse <yangsita@gmail.com>2010-11-28 23:11:14 +0100
commit5db0a412ff6972e51ccddaf1e8d6a27c8de4990f (patch)
tree8c8cfa609c25c68929554ac1e24eaa4084683152 /lib/cookie.c
parentcbe67a1b71f7098779b8c0cecccb60382cec2d20 (diff)
downloadcurl-5db0a412ff6972e51ccddaf1e8d6a27c8de4990f.tar.gz
atoi: remove atoi usage
Diffstat (limited to 'lib/cookie.c')
-rw-r--r--lib/cookie.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/cookie.c b/lib/cookie.c
index 21617adce..c6460a100 100644
--- a/lib/cookie.c
+++ b/lib/cookie.c
@@ -353,8 +353,8 @@ Curl_cookie_add(struct SessionHandle *data,
break;
}
co->expires =
- atoi((*co->maxage=='\"')?&co->maxage[1]:&co->maxage[0]) +
- (long)now;
+ strtol((*co->maxage=='\"')?&co->maxage[1]:&co->maxage[0],NULL,10)
+ + (long)now;
}
else if(Curl_raw_equal("expires", name)) {
strstore(&co->expirestr, whatptr);