mirror of
https://github.com/curl/curl.git
synced 2026-06-06 20:14:20 +03:00
tidy-up: replace (-1 == expressions 2
This commit is contained in:
parent
b17c0a2b4f
commit
2530adcf4d
4 changed files with 4 additions and 4 deletions
|
|
@ -1759,7 +1759,7 @@ static CURLcode wssl_handshake(struct Curl_cfilter *cf,
|
|||
}
|
||||
}
|
||||
#ifdef USE_ECH_WOLFSSL
|
||||
else if(-1 == detail) {
|
||||
else if(detail == -1) {
|
||||
/* try access a retry_config ECHConfigList for tracing */
|
||||
byte echConfigs[1000];
|
||||
word32 echConfigsLen = 1000;
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ CURLcode create_dir_hierarchy(const char *outfile, struct GlobalConfig *global)
|
|||
|
||||
/* Create directory. Ignore access denied error to allow traversal. */
|
||||
/* !checksrc! disable ERRNOVAR 1 */
|
||||
if(!skip && (-1 == mkdir(curlx_dyn_ptr(&dirbuf), (mode_t)0000750)) &&
|
||||
if(!skip && (mkdir(curlx_dyn_ptr(&dirbuf), (mode_t)0000750) == -1) &&
|
||||
(errno != EACCES) && (errno != EEXIST)) {
|
||||
show_dir_errno(global, curlx_dyn_ptr(&dirbuf));
|
||||
result = CURLE_WRITE_ERROR;
|
||||
|
|
|
|||
|
|
@ -1585,7 +1585,7 @@ static ParameterError parse_time_cond(struct OperationConfig *config,
|
|||
break;
|
||||
}
|
||||
config->condtime = (curl_off_t)curl_getdate(nextarg, NULL);
|
||||
if(-1 == config->condtime) {
|
||||
if(config->condtime == -1) {
|
||||
curl_off_t value;
|
||||
/* now let's see if it is a filename to get the time from instead! */
|
||||
int rc = getfiletime(nextarg, config->global, &value);
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ char *getpass_r(const char *prompt, /* prompt to display */
|
|||
ssize_t nread;
|
||||
bool disabled;
|
||||
int fd = open("/dev/tty", O_RDONLY);
|
||||
if(-1 == fd)
|
||||
if(fd == -1)
|
||||
fd = STDIN_FILENO; /* use stdin if the tty could not be used */
|
||||
|
||||
disabled = ttyecho(FALSE, fd); /* disable terminal echo */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue