From b17c0a2b4f3ac76db4c23d4cfa6fe5721e4c6133 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 9 Jul 2025 19:45:24 +0200 Subject: [PATCH] tidy-up: replace `(-1 == ` expressions examples --- docs/examples/anyauthput.c | 2 +- docs/examples/sftpuploadresume.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/examples/anyauthput.c b/docs/examples/anyauthput.c index 550c827693..7106c32eb6 100644 --- a/docs/examples/anyauthput.c +++ b/docs/examples/anyauthput.c @@ -61,7 +61,7 @@ static int my_seek(void *userp, curl_off_t offset, int origin) { FILE *fp = (FILE *) userp; - if(-1 == fseek(fp, (long) offset, origin)) + if(fseek(fp, (long) offset, origin) == -1) /* could not seek */ return CURL_SEEKFUNC_CANTSEEK; diff --git a/docs/examples/sftpuploadresume.c b/docs/examples/sftpuploadresume.c index 2803da33e0..f1f7b0c275 100644 --- a/docs/examples/sftpuploadresume.c +++ b/docs/examples/sftpuploadresume.c @@ -83,7 +83,7 @@ static int sftpResumeUpload(CURL *curlhandle, const char *remotepath, CURLcode result = CURLE_GOT_NOTHING; curl_off_t remoteFileSizeByte = sftpGetRemoteFileSize(remotepath); - if(-1 == remoteFileSizeByte) { + if(remoteFileSizeByte == -1) { printf("Error reading the remote file size: unable to resume upload\n"); return -1; }