tidy-up: replace (-1 == expressions 2

This commit is contained in:
Viktor Szakats 2025-07-09 19:46:55 +02:00
parent b17c0a2b4f
commit 2530adcf4d
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
4 changed files with 4 additions and 4 deletions

View file

@ -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;

View file

@ -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;

View file

@ -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);

View file

@ -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 */