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