Loading lib/base64.c +1 −2 Original line number Original line Diff line number Diff line Loading @@ -49,13 +49,12 @@ static size_t decodeQuantum(unsigned char *dest, const char *src) unsigned long i, x = 0; unsigned long i, x = 0; for(i = 0, s = src; i < 4; i++, s++) { for(i = 0, s = src; i < 4; i++, s++) { unsigned long v = 0; if(*s == '=') { if(*s == '=') { x = (x << 6); x = (x << 6); padding++; padding++; } } else { else { unsigned long v = 0; p = base64; p = base64; while(*p && (*p != *s)) { while(*p && (*p != *s)) { Loading lib/connect.c +1 −5 Original line number Original line Diff line number Diff line Loading @@ -1237,8 +1237,6 @@ static int conn_is_conn(struct connectdata *conn, void *param) curl_socket_t Curl_getconnectinfo(struct Curl_easy *data, curl_socket_t Curl_getconnectinfo(struct Curl_easy *data, struct connectdata **connp) struct connectdata **connp) { { curl_socket_t sockfd; DEBUGASSERT(data); DEBUGASSERT(data); /* this works for an easy handle: /* this works for an easy handle: Loading @@ -1264,12 +1262,10 @@ curl_socket_t Curl_getconnectinfo(struct Curl_easy *data, if(connp) if(connp) /* only store this if the caller cares for it */ /* only store this if the caller cares for it */ *connp = c; *connp = c; sockfd = c->sock[FIRSTSOCKET]; return c->sock[FIRSTSOCKET]; } } else else return CURL_SOCKET_BAD; return CURL_SOCKET_BAD; return sockfd; } } /* /* Loading lib/content_encoding.c +3 −5 Original line number Original line Diff line number Diff line Loading @@ -163,7 +163,6 @@ static CURLcode inflate_stream(struct connectdata *conn, z_stream *z = &zp->z; /* zlib state structure */ z_stream *z = &zp->z; /* zlib state structure */ uInt nread = z->avail_in; uInt nread = z->avail_in; Bytef *orig_in = z->next_in; Bytef *orig_in = z->next_in; int status; /* zlib status */ bool done = FALSE; bool done = FALSE; CURLcode result = CURLE_OK; /* Curl_client_write status */ CURLcode result = CURLE_OK; /* Curl_client_write status */ char *decomp; /* Put the decompressed data here. */ char *decomp; /* Put the decompressed data here. */ Loading @@ -184,6 +183,7 @@ static CURLcode inflate_stream(struct connectdata *conn, /* because the buffer size is fixed, iteratively decompress and transfer to /* because the buffer size is fixed, iteratively decompress and transfer to the client via downstream_write function. */ the client via downstream_write function. */ while(!done) { while(!done) { int status; /* zlib status */ done = TRUE; done = TRUE; /* (re)set buffer for decompressed output for every iteration */ /* (re)set buffer for decompressed output for every iteration */ Loading Loading @@ -761,7 +761,6 @@ char *Curl_all_content_encodings(void) const content_encoding * const *cep; const content_encoding * const *cep; const content_encoding *ce; const content_encoding *ce; char *ace; char *ace; char *p; for(cep = encodings; *cep; cep++) { for(cep = encodings; *cep; cep++) { ce = *cep; ce = *cep; Loading @@ -774,7 +773,7 @@ char *Curl_all_content_encodings(void) ace = malloc(len); ace = malloc(len); if(ace) { if(ace) { p = ace; char *p = ace; for(cep = encodings; *cep; cep++) { for(cep = encodings; *cep; cep++) { ce = *cep; ce = *cep; if(!strcasecompare(ce->name, CONTENT_ENCODING_DEFAULT)) { if(!strcasecompare(ce->name, CONTENT_ENCODING_DEFAULT)) { Loading Loading @@ -921,10 +920,9 @@ void Curl_unencode_cleanup(struct connectdata *conn) static const content_encoding *find_encoding(const char *name, size_t len) static const content_encoding *find_encoding(const char *name, size_t len) { { const content_encoding * const *cep; const content_encoding * const *cep; const content_encoding *ce; for(cep = encodings; *cep; cep++) { for(cep = encodings; *cep; cep++) { ce = *cep; const content_encoding *ce = *cep; if((strncasecompare(name, ce->name, len) && !ce->name[len]) || if((strncasecompare(name, ce->name, len) && !ce->name[len]) || (ce->alias && strncasecompare(name, ce->alias, len) && !ce->alias[len])) (ce->alias && strncasecompare(name, ce->alias, len) && !ce->alias[len])) return ce; return ce; Loading lib/cookie.c +3 −4 Original line number Original line Diff line number Diff line Loading @@ -376,13 +376,13 @@ static void strstore(char **str, const char *newstr) */ */ static void remove_expired(struct CookieInfo *cookies) static void remove_expired(struct CookieInfo *cookies) { { struct Cookie *co, *nx, *pv; struct Cookie *co, *nx; curl_off_t now = (curl_off_t)time(NULL); curl_off_t now = (curl_off_t)time(NULL); unsigned int i; unsigned int i; for(i = 0; i < COOKIE_HASH_SIZE; i++) { for(i = 0; i < COOKIE_HASH_SIZE; i++) { struct Cookie *pv = NULL; co = cookies->cookies[i]; co = cookies->cookies[i]; pv = NULL; while(co) { while(co) { nx = co->next; nx = co->next; if(co->expires && co->expires < now) { if(co->expires && co->expires < now) { Loading Loading @@ -1385,9 +1385,8 @@ void Curl_cookie_clearsess(struct CookieInfo *cookies) ****************************************************************************/ ****************************************************************************/ void Curl_cookie_cleanup(struct CookieInfo *c) void Curl_cookie_cleanup(struct CookieInfo *c) { { unsigned int i; if(c) { if(c) { unsigned int i; free(c->filename); free(c->filename); for(i = 0; i < COOKIE_HASH_SIZE; i++) for(i = 0; i < COOKIE_HASH_SIZE; i++) Curl_cookie_freelist(c->cookies[i]); Curl_cookie_freelist(c->cookies[i]); Loading lib/curl_sasl.c +1 −2 Original line number Original line Diff line number Diff line Loading @@ -146,7 +146,6 @@ CURLcode Curl_sasl_parse_url_auth_option(struct SASL *sasl, const char *value, size_t len) const char *value, size_t len) { { CURLcode result = CURLE_OK; CURLcode result = CURLE_OK; unsigned int mechbit; size_t mechlen; size_t mechlen; if(!len) if(!len) Loading @@ -160,7 +159,7 @@ CURLcode Curl_sasl_parse_url_auth_option(struct SASL *sasl, if(!strncmp(value, "*", len)) if(!strncmp(value, "*", len)) sasl->prefmech = SASL_AUTH_DEFAULT; sasl->prefmech = SASL_AUTH_DEFAULT; else { else { mechbit = Curl_sasl_decode_mech(value, len, &mechlen); unsigned int mechbit = Curl_sasl_decode_mech(value, len, &mechlen); if(mechbit && mechlen == len) if(mechbit && mechlen == len) sasl->prefmech |= mechbit; sasl->prefmech |= mechbit; else else Loading Loading
lib/base64.c +1 −2 Original line number Original line Diff line number Diff line Loading @@ -49,13 +49,12 @@ static size_t decodeQuantum(unsigned char *dest, const char *src) unsigned long i, x = 0; unsigned long i, x = 0; for(i = 0, s = src; i < 4; i++, s++) { for(i = 0, s = src; i < 4; i++, s++) { unsigned long v = 0; if(*s == '=') { if(*s == '=') { x = (x << 6); x = (x << 6); padding++; padding++; } } else { else { unsigned long v = 0; p = base64; p = base64; while(*p && (*p != *s)) { while(*p && (*p != *s)) { Loading
lib/connect.c +1 −5 Original line number Original line Diff line number Diff line Loading @@ -1237,8 +1237,6 @@ static int conn_is_conn(struct connectdata *conn, void *param) curl_socket_t Curl_getconnectinfo(struct Curl_easy *data, curl_socket_t Curl_getconnectinfo(struct Curl_easy *data, struct connectdata **connp) struct connectdata **connp) { { curl_socket_t sockfd; DEBUGASSERT(data); DEBUGASSERT(data); /* this works for an easy handle: /* this works for an easy handle: Loading @@ -1264,12 +1262,10 @@ curl_socket_t Curl_getconnectinfo(struct Curl_easy *data, if(connp) if(connp) /* only store this if the caller cares for it */ /* only store this if the caller cares for it */ *connp = c; *connp = c; sockfd = c->sock[FIRSTSOCKET]; return c->sock[FIRSTSOCKET]; } } else else return CURL_SOCKET_BAD; return CURL_SOCKET_BAD; return sockfd; } } /* /* Loading
lib/content_encoding.c +3 −5 Original line number Original line Diff line number Diff line Loading @@ -163,7 +163,6 @@ static CURLcode inflate_stream(struct connectdata *conn, z_stream *z = &zp->z; /* zlib state structure */ z_stream *z = &zp->z; /* zlib state structure */ uInt nread = z->avail_in; uInt nread = z->avail_in; Bytef *orig_in = z->next_in; Bytef *orig_in = z->next_in; int status; /* zlib status */ bool done = FALSE; bool done = FALSE; CURLcode result = CURLE_OK; /* Curl_client_write status */ CURLcode result = CURLE_OK; /* Curl_client_write status */ char *decomp; /* Put the decompressed data here. */ char *decomp; /* Put the decompressed data here. */ Loading @@ -184,6 +183,7 @@ static CURLcode inflate_stream(struct connectdata *conn, /* because the buffer size is fixed, iteratively decompress and transfer to /* because the buffer size is fixed, iteratively decompress and transfer to the client via downstream_write function. */ the client via downstream_write function. */ while(!done) { while(!done) { int status; /* zlib status */ done = TRUE; done = TRUE; /* (re)set buffer for decompressed output for every iteration */ /* (re)set buffer for decompressed output for every iteration */ Loading Loading @@ -761,7 +761,6 @@ char *Curl_all_content_encodings(void) const content_encoding * const *cep; const content_encoding * const *cep; const content_encoding *ce; const content_encoding *ce; char *ace; char *ace; char *p; for(cep = encodings; *cep; cep++) { for(cep = encodings; *cep; cep++) { ce = *cep; ce = *cep; Loading @@ -774,7 +773,7 @@ char *Curl_all_content_encodings(void) ace = malloc(len); ace = malloc(len); if(ace) { if(ace) { p = ace; char *p = ace; for(cep = encodings; *cep; cep++) { for(cep = encodings; *cep; cep++) { ce = *cep; ce = *cep; if(!strcasecompare(ce->name, CONTENT_ENCODING_DEFAULT)) { if(!strcasecompare(ce->name, CONTENT_ENCODING_DEFAULT)) { Loading Loading @@ -921,10 +920,9 @@ void Curl_unencode_cleanup(struct connectdata *conn) static const content_encoding *find_encoding(const char *name, size_t len) static const content_encoding *find_encoding(const char *name, size_t len) { { const content_encoding * const *cep; const content_encoding * const *cep; const content_encoding *ce; for(cep = encodings; *cep; cep++) { for(cep = encodings; *cep; cep++) { ce = *cep; const content_encoding *ce = *cep; if((strncasecompare(name, ce->name, len) && !ce->name[len]) || if((strncasecompare(name, ce->name, len) && !ce->name[len]) || (ce->alias && strncasecompare(name, ce->alias, len) && !ce->alias[len])) (ce->alias && strncasecompare(name, ce->alias, len) && !ce->alias[len])) return ce; return ce; Loading
lib/cookie.c +3 −4 Original line number Original line Diff line number Diff line Loading @@ -376,13 +376,13 @@ static void strstore(char **str, const char *newstr) */ */ static void remove_expired(struct CookieInfo *cookies) static void remove_expired(struct CookieInfo *cookies) { { struct Cookie *co, *nx, *pv; struct Cookie *co, *nx; curl_off_t now = (curl_off_t)time(NULL); curl_off_t now = (curl_off_t)time(NULL); unsigned int i; unsigned int i; for(i = 0; i < COOKIE_HASH_SIZE; i++) { for(i = 0; i < COOKIE_HASH_SIZE; i++) { struct Cookie *pv = NULL; co = cookies->cookies[i]; co = cookies->cookies[i]; pv = NULL; while(co) { while(co) { nx = co->next; nx = co->next; if(co->expires && co->expires < now) { if(co->expires && co->expires < now) { Loading Loading @@ -1385,9 +1385,8 @@ void Curl_cookie_clearsess(struct CookieInfo *cookies) ****************************************************************************/ ****************************************************************************/ void Curl_cookie_cleanup(struct CookieInfo *c) void Curl_cookie_cleanup(struct CookieInfo *c) { { unsigned int i; if(c) { if(c) { unsigned int i; free(c->filename); free(c->filename); for(i = 0; i < COOKIE_HASH_SIZE; i++) for(i = 0; i < COOKIE_HASH_SIZE; i++) Curl_cookie_freelist(c->cookies[i]); Curl_cookie_freelist(c->cookies[i]); Loading
lib/curl_sasl.c +1 −2 Original line number Original line Diff line number Diff line Loading @@ -146,7 +146,6 @@ CURLcode Curl_sasl_parse_url_auth_option(struct SASL *sasl, const char *value, size_t len) const char *value, size_t len) { { CURLcode result = CURLE_OK; CURLcode result = CURLE_OK; unsigned int mechbit; size_t mechlen; size_t mechlen; if(!len) if(!len) Loading @@ -160,7 +159,7 @@ CURLcode Curl_sasl_parse_url_auth_option(struct SASL *sasl, if(!strncmp(value, "*", len)) if(!strncmp(value, "*", len)) sasl->prefmech = SASL_AUTH_DEFAULT; sasl->prefmech = SASL_AUTH_DEFAULT; else { else { mechbit = Curl_sasl_decode_mech(value, len, &mechlen); unsigned int mechbit = Curl_sasl_decode_mech(value, len, &mechlen); if(mechbit && mechlen == len) if(mechbit && mechlen == len) sasl->prefmech |= mechbit; sasl->prefmech |= mechbit; else else Loading