aboutsummaryrefslogtreecommitdiff
path: root/lib/cookie.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-01-29 13:56:45 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-01-29 13:56:45 +0000
commit4d17d6876e4b2f08380812c4ec113073b0a14639 (patch)
tree7283f07518be4c7250d72ac89c38729563ffa642 /lib/cookie.c
parent0d6236f7e10468f75d09796ba9640c9054ab1f04 (diff)
Dan Fandrich's cleanup patch to make pedantic compiler options cause less
warnings. Minor edits by me.
Diffstat (limited to 'lib/cookie.c')
-rw-r--r--lib/cookie.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/cookie.c b/lib/cookie.c
index f6f842f66..fa6194448 100644
--- a/lib/cookie.c
+++ b/lib/cookie.c
@@ -211,7 +211,7 @@ Curl_cookie_add(struct SessionHandle *data,
/* note that this name may or may not have a preceeding dot, but
we don't care about that, we treat the names the same anyway */
- char *ptr=whatptr;
+ const char *domptr=whatptr;
int dotcount=1;
unsigned int i;
@@ -224,15 +224,15 @@ Curl_cookie_add(struct SessionHandle *data,
if('.' == whatptr[0])
/* don't count the initial dot, assume it */
- ptr++;
+ domptr++;
do {
- ptr = strchr(ptr, '.');
- if(ptr) {
- ptr++;
+ domptr = strchr(domptr, '.');
+ if(domptr) {
+ domptr++;
dotcount++;
}
- } while(ptr);
+ } while(domptr);
for(i=0;
i<sizeof(seventhree)/sizeof(seventhree[0]); i++) {
@@ -259,10 +259,10 @@ Curl_cookie_add(struct SessionHandle *data,
or the given domain is not valid and thus cannot be set. */
if(!domain || tailmatch(whatptr, domain)) {
- char *ptr=whatptr;
- if(ptr[0] == '.')
- ptr++;
- co->domain=strdup(ptr); /* dont prefix with dots internally */
+ const char *tailptr=whatptr;
+ if(tailptr[0] == '.')
+ tailptr++;
+ co->domain=strdup(tailptr); /* don't prefix w/dots internally */
co->tailmatch=TRUE; /* we always do that if the domain name was
given */
}