mirror of
https://github.com/curl/curl.git
synced 2026-07-31 10:58:04 +03:00
parent
080973dcdb
commit
cd2b45201a
32 changed files with 68 additions and 75 deletions
|
|
@ -173,7 +173,7 @@ int tool_debug_cb(CURL *handle, curl_infotype type,
|
|||
log_line_start(output, timebuf, idsbuf, type);
|
||||
(void)fwrite(data + st, i - st + 1, 1, output);
|
||||
}
|
||||
newl = (size && (data[size - 1] != '\n')) ? TRUE : FALSE;
|
||||
newl = (size && (data[size - 1] != '\n'));
|
||||
traced_data = FALSE;
|
||||
break;
|
||||
case CURLINFO_TEXT:
|
||||
|
|
@ -181,7 +181,7 @@ int tool_debug_cb(CURL *handle, curl_infotype type,
|
|||
if(!newl)
|
||||
log_line_start(output, timebuf, idsbuf, type);
|
||||
(void)fwrite(data, size, 1, output);
|
||||
newl = (size && (data[size - 1] != '\n')) ? TRUE : FALSE;
|
||||
newl = (size && (data[size - 1] != '\n'));
|
||||
traced_data = FALSE;
|
||||
break;
|
||||
case CURLINFO_DATA_OUT:
|
||||
|
|
|
|||
|
|
@ -1218,7 +1218,7 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
|
|||
config->disallow_username_in_url = toggle;
|
||||
break;
|
||||
case C_EPSV: /* --epsv */
|
||||
config->disable_epsv = (!toggle) ? TRUE : FALSE;
|
||||
config->disable_epsv = !toggle;
|
||||
break;
|
||||
case C_DNS_SERVERS: /* --dns-servers */
|
||||
if(!curlinfo->ares_num) /* c-ares is needed for this */
|
||||
|
|
@ -1248,7 +1248,7 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
|
|||
}
|
||||
break;
|
||||
case C_ALPN: /* --alpn */
|
||||
config->noalpn = (!toggle) ? TRUE : FALSE;
|
||||
config->noalpn = !toggle;
|
||||
break;
|
||||
case C_LIMIT_RATE: /* --limit-rate */
|
||||
err = GetSizeParameter(global, nextarg, "rate", &value);
|
||||
|
|
@ -1371,7 +1371,7 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
|
|||
config->disable_eprt = toggle;
|
||||
break;
|
||||
case C_EPRT: /* --eprt */
|
||||
config->disable_eprt = (!toggle) ? TRUE : FALSE;
|
||||
config->disable_eprt = !toggle;
|
||||
break;
|
||||
case C_XATTR: /* --xattr */
|
||||
config->xattr = toggle;
|
||||
|
|
@ -1552,7 +1552,7 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
|
|||
config->ftp_ssl_reqd = toggle;
|
||||
break;
|
||||
case C_SESSIONID: /* --sessionid */
|
||||
config->disable_sessionid = (!toggle) ? TRUE : FALSE;
|
||||
config->disable_sessionid = !toggle;
|
||||
break;
|
||||
case C_FTP_SSL_CONTROL: /* --ftp-ssl-control */
|
||||
if(toggle && !feature_ssl)
|
||||
|
|
@ -1582,7 +1582,7 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
|
|||
config->raw = toggle;
|
||||
break;
|
||||
case C_KEEPALIVE: /* --keepalive */
|
||||
config->nokeepalive = (!toggle) ? TRUE : FALSE;
|
||||
config->nokeepalive = !toggle;
|
||||
break;
|
||||
case C_KEEPALIVE_TIME: /* --keepalive-time */
|
||||
err = str2unum(&config->alivetime, nextarg);
|
||||
|
|
@ -2167,7 +2167,7 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
|
|||
nextarg,
|
||||
&config->mimeroot,
|
||||
&config->mimecurrent,
|
||||
(cmd == C_FORM_STRING) ? TRUE : FALSE)) /* literal string */
|
||||
(cmd == C_FORM_STRING))) /* literal string */
|
||||
err = PARAM_BAD_USE;
|
||||
else if(SetHTTPrequest(config, TOOL_HTTPREQ_MIMEPOST, &config->httpreq))
|
||||
err = PARAM_BAD_USE;
|
||||
|
|
|
|||
|
|
@ -2456,7 +2456,7 @@ static CURLcode add_parallel_transfers(struct GlobalConfig *global,
|
|||
all_added++;
|
||||
*addedp = TRUE;
|
||||
}
|
||||
*morep = (per || sleeping) ? TRUE : FALSE;
|
||||
*morep = (per || sleeping);
|
||||
return CURLE_OK;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -66,8 +66,7 @@ bool output_expected(const char *url, const char *uploadfile)
|
|||
|
||||
bool stdin_upload(const char *uploadfile)
|
||||
{
|
||||
return (!strcmp(uploadfile, "-") ||
|
||||
!strcmp(uploadfile, ".")) ? TRUE : FALSE;
|
||||
return (!strcmp(uploadfile, "-") || !strcmp(uploadfile, "."));
|
||||
}
|
||||
|
||||
/* Convert a CURLUcode into a CURLcode */
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ int parseconfig(const char *filename, struct GlobalConfig *global)
|
|||
option = line;
|
||||
|
||||
/* the option starts with a dash? */
|
||||
dashed_option = (option[0] == '-') ? TRUE : FALSE;
|
||||
dashed_option = (option[0] == '-');
|
||||
|
||||
while(*line && !ISSPACE(*line) && !ISSEP(*line, dashed_option))
|
||||
line++;
|
||||
|
|
@ -311,7 +311,7 @@ static bool my_get_line(FILE *fp, struct curlx_dynbuf *db,
|
|||
occurs while no characters have been read. */
|
||||
if(!fgets(buf, sizeof(buf), fp))
|
||||
/* only if there is data in the line, return TRUE */
|
||||
return curlx_dyn_len(db) ? TRUE : FALSE;
|
||||
return curlx_dyn_len(db);
|
||||
if(curlx_dyn_add(db, buf)) {
|
||||
*error = TRUE; /* error */
|
||||
return FALSE; /* stop reading */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue