]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
file: fix "Checking if unsigned variable 'readcount' is less than zero."
authorDaniel Stenberg <daniel@haxx.se>
Tue, 12 Mar 2019 09:03:21 +0000 (10:03 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 12 Mar 2019 20:46:11 +0000 (21:46 +0100)
Pointed out by codacy

Closes #3672

lib/file.c

index 8bba3b91651e367eb9e3eea1bb7078b2547eab28..d349cd9241cdc9ae93f5e4f5dc67a40cd6d57b84 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -311,7 +311,7 @@ static CURLcode file_upload(struct connectdata *conn)
     if(result)
       break;
 
-    if(readcount <= 0)  /* fix questionable compare error. curlvms */
+    if(!readcount)
       break;
 
     nread = readcount;