fix compiler warning: assignment within conditional expression
This commit is contained in:
parent
46a0062dff
commit
9c4ff4874e
@ -226,7 +226,7 @@ static int smtp_endofresp(struct pingpong *pp, int *resp)
|
|||||||
if(len < 4 || !ISDIGIT(line[0]) || !ISDIGIT(line[1]) || !ISDIGIT(line[2]))
|
if(len < 4 || !ISDIGIT(line[0]) || !ISDIGIT(line[1]) || !ISDIGIT(line[2]))
|
||||||
return FALSE; /* Nothing for us. */
|
return FALSE; /* Nothing for us. */
|
||||||
|
|
||||||
if((result = line[3] == ' '))
|
if((result = (line[3] == ' ')) != 0)
|
||||||
*resp = curlx_sltosi(strtol(line, NULL, 10));
|
*resp = curlx_sltosi(strtol(line, NULL, 10));
|
||||||
|
|
||||||
line += 4;
|
line += 4;
|
||||||
@ -677,7 +677,8 @@ static CURLcode smtp_state_authcram_resp(struct connectdata *conn,
|
|||||||
if(++l) {
|
if(++l) {
|
||||||
chlg64[l] = '\0';
|
chlg64[l] = '\0';
|
||||||
|
|
||||||
if(!(chlglen = Curl_base64_decode(chlg64, &chlg)))
|
chlglen = Curl_base64_decode(chlg64, &chlg);
|
||||||
|
if(!chlglen)
|
||||||
return CURLE_OUT_OF_MEMORY;
|
return CURLE_OUT_OF_MEMORY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
16
src/main.c
16
src/main.c
@ -1144,7 +1144,7 @@ static int formparse(struct Configurable *config,
|
|||||||
char *sep2;
|
char *sep2;
|
||||||
|
|
||||||
if((1 == sscanf(input, "%255[^=]=", name)) &&
|
if((1 == sscanf(input, "%255[^=]=", name)) &&
|
||||||
(contp = strchr(input, '='))) {
|
((contp = strchr(input, '=')) != NULL)) {
|
||||||
/* the input was using the correct format */
|
/* the input was using the correct format */
|
||||||
|
|
||||||
/* Allocate the contents */
|
/* Allocate the contents */
|
||||||
@ -2246,7 +2246,7 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
|
|||||||
default: /* the URL! */
|
default: /* the URL! */
|
||||||
{
|
{
|
||||||
struct getout *url;
|
struct getout *url;
|
||||||
if(config->url_get || (config->url_get=config->url_list)) {
|
if(config->url_get || ((config->url_get = config->url_list) != NULL)) {
|
||||||
/* there's a node here, if it already is filled-in continue to find
|
/* there's a node here, if it already is filled-in continue to find
|
||||||
an "empty" node */
|
an "empty" node */
|
||||||
while(config->url_get && (config->url_get->flags&GETOUT_URL))
|
while(config->url_get && (config->url_get->flags&GETOUT_URL))
|
||||||
@ -2904,7 +2904,7 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
|
|||||||
/* output file */
|
/* output file */
|
||||||
{
|
{
|
||||||
struct getout *url;
|
struct getout *url;
|
||||||
if(config->url_out || (config->url_out=config->url_list)) {
|
if(config->url_out || ((config->url_out = config->url_list) != NULL)) {
|
||||||
/* there's a node here, if it already is filled-in continue to find
|
/* there's a node here, if it already is filled-in continue to find
|
||||||
an "empty" node */
|
an "empty" node */
|
||||||
while(config->url_out && (config->url_out->flags&GETOUT_OUTFILE))
|
while(config->url_out && (config->url_out->flags&GETOUT_OUTFILE))
|
||||||
@ -3032,7 +3032,7 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
|
|||||||
/* we are uploading */
|
/* we are uploading */
|
||||||
{
|
{
|
||||||
struct getout *url;
|
struct getout *url;
|
||||||
if(config->url_out || (config->url_out=config->url_list)) {
|
if(config->url_out || ((config->url_out = config->url_list) != NULL)) {
|
||||||
/* there's a node here, if it already is filled-in continue to find
|
/* there's a node here, if it already is filled-in continue to find
|
||||||
an "empty" node */
|
an "empty" node */
|
||||||
while(config->url_out && (config->url_out->flags&GETOUT_UPLOAD))
|
while(config->url_out && (config->url_out->flags&GETOUT_UPLOAD))
|
||||||
@ -4234,7 +4234,7 @@ static void dumpeasycode(struct Configurable *config)
|
|||||||
int i;
|
int i;
|
||||||
const char *c;
|
const char *c;
|
||||||
|
|
||||||
for(i=0; (c = srchead[i]); i++)
|
for(i=0; ((c = srchead[i]) != '\0'); i++)
|
||||||
fprintf(out, "%s\n", c);
|
fprintf(out, "%s\n", c);
|
||||||
|
|
||||||
ptr = easycode;
|
ptr = easycode;
|
||||||
@ -4796,9 +4796,9 @@ operate(struct Configurable *config, int argc, argv_item_t argv[])
|
|||||||
single globbed string. If no upload, we enter the loop once anyway. */
|
single globbed string. If no upload, we enter the loop once anyway. */
|
||||||
for(up = 0;
|
for(up = 0;
|
||||||
(!up && !infiles) ||
|
(!up && !infiles) ||
|
||||||
(uploadfile = inglob?
|
((uploadfile = inglob?
|
||||||
glob_next_url(inglob):
|
glob_next_url(inglob):
|
||||||
(!up?strdup(infiles):NULL));
|
(!up?strdup(infiles):NULL)) != NULL);
|
||||||
up++) {
|
up++) {
|
||||||
int separator = 0;
|
int separator = 0;
|
||||||
long retry_numretries;
|
long retry_numretries;
|
||||||
@ -4821,7 +4821,7 @@ operate(struct Configurable *config, int argc, argv_item_t argv[])
|
|||||||
|
|
||||||
/* Here's looping around each globbed URL */
|
/* Here's looping around each globbed URL */
|
||||||
for(i = 0;
|
for(i = 0;
|
||||||
(url = urls?glob_next_url(urls):(i?NULL:strdup(url)));
|
((url = urls?glob_next_url(urls):(i?NULL:strdup(url))) != NULL);
|
||||||
i++) {
|
i++) {
|
||||||
/* NOTE: In the condition expression in the for() statement above, the
|
/* NOTE: In the condition expression in the for() statement above, the
|
||||||
'url' variable is only ever strdup()ed if(i == 0) and thus never
|
'url' variable is only ever strdup()ed if(i == 0) and thus never
|
||||||
|
Loading…
x
Reference in New Issue
Block a user