lib, src, tests: added space around ternary expressions

Closes #14912
This commit is contained in:
Gabriel Marin 2024-09-14 23:04:21 +03:00 committed by Daniel Stenberg
parent 0236276c3d
commit 5a263710f6
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
30 changed files with 60 additions and 60 deletions

View file

@ -1216,7 +1216,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) ? TRUE : FALSE;
break;
case C_DNS_SERVERS: /* --dns-servers */
if(!curlinfo->ares_num) /* c-ares is needed for this */
@ -1246,7 +1246,7 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
}
break;
case C_ALPN: /* --alpn */
config->noalpn = (!toggle)?TRUE:FALSE;
config->noalpn = (!toggle) ? TRUE : FALSE;
break;
case C_LIMIT_RATE: /* --limit-rate */
err = GetSizeParameter(global, nextarg, "rate", &value);
@ -1367,7 +1367,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) ? TRUE : FALSE;
break;
case C_XATTR: /* --xattr */
config->xattr = toggle;
@ -1548,7 +1548,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) ? TRUE : FALSE;
break;
case C_FTP_SSL_CONTROL: /* --ftp-ssl-control */
if(toggle && !feature_ssl)
@ -1578,7 +1578,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) ? TRUE : FALSE;
break;
case C_KEEPALIVE_TIME: /* --keepalive-time */
err = str2unum(&config->alivetime, nextarg);
@ -2163,7 +2163,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) ? TRUE : FALSE)) /* literal string */
err = PARAM_BAD_USE;
else if(SetHTTPrequest(config, TOOL_HTTPREQ_MIMEPOST, &config->httpreq))
err = PARAM_BAD_USE;
@ -2198,7 +2198,7 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
char *string;
size_t len;
bool use_stdin = !strcmp(&nextarg[1], "-");
FILE *file = use_stdin?stdin:fopen(&nextarg[1], FOPEN_READTEXT);
FILE *file = use_stdin ? stdin : fopen(&nextarg[1], FOPEN_READTEXT);
if(!file) {
errorf(global, "Failed to open %s", &nextarg[1]);
err = PARAM_READ_ERROR;

View file

@ -123,7 +123,7 @@ CURLcode add_file_name_to_url(CURL *curl, char **inurlp, const char *filename)
/* We only want the part of the local path that is on the right
side of the rightmost slash and backslash. */
const char *filep = strrchr(filename, '/');
char *file2 = strrchr(filep?filep:filename, '\\');
char *file2 = strrchr(filep ? filep : filename, '\\');
char *encfile;
if(file2)

View file

@ -156,7 +156,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] == '-') ? TRUE : FALSE;
while(*line && !ISSPACE(*line) && !ISSEP(*line, dashed_option))
line++;