mirror of
https://github.com/curl/curl.git
synced 2026-08-24 14:23:30 +03:00
checksrc: warn for assignments within if() expressions
... they're already frowned upon in our source code style guide, this now enforces the rule harder.
This commit is contained in:
parent
b228d2952b
commit
1c3e8bbfed
86 changed files with 413 additions and 226 deletions
|
|
@ -75,7 +75,7 @@ CURLcode Curl_output_digest(struct connectdata *conn,
|
|||
CURLcode result;
|
||||
struct Curl_easy *data = conn->data;
|
||||
unsigned char *path;
|
||||
char *tmp;
|
||||
char *tmp = NULL;
|
||||
char *response;
|
||||
size_t len;
|
||||
bool have_chlg;
|
||||
|
|
@ -140,12 +140,14 @@ CURLcode Curl_output_digest(struct connectdata *conn,
|
|||
http://www.fngtps.com/2006/09/http-authentication
|
||||
*/
|
||||
|
||||
if(authp->iestyle && ((tmp = strchr((char *)uripath, '?')) != NULL)) {
|
||||
size_t urilen = tmp - (char *)uripath;
|
||||
|
||||
path = (unsigned char *) aprintf("%.*s", urilen, uripath);
|
||||
if(authp->iestyle) {
|
||||
tmp = strchr((char *)uripath, '?');
|
||||
if(tmp) {
|
||||
size_t urilen = tmp - (char *)uripath;
|
||||
path = (unsigned char *) aprintf("%.*s", urilen, uripath);
|
||||
}
|
||||
}
|
||||
else
|
||||
if(!tmp)
|
||||
path = (unsigned char *) strdup((char *) uripath);
|
||||
|
||||
if(!path)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue