wget: fix signedness in the compare (paranoia only, G.content_len is never < 0)
authorDenys Vlasenko <vda.linux@googlemail.com>
Fri, 11 Dec 2009 13:12:28 +0000 (14:12 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Fri, 11 Dec 2009 13:12:28 +0000 (14:12 +0100)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
networking/wget.c

index 64553d49aebd179e7dc23adc51f9323b42398dc5..ad1770b5803acb7a9b9a812b0fb3770936b7a5a0 100644 (file)
@@ -462,7 +462,7 @@ static void NOINLINE retrieve_file_data(FILE *dfp, int output_fd)
 
                        rdsz = sizeof(buf);
                        if (G.got_clen) {
-                               if (G.content_len < sizeof(buf)) {
+                               if (G.content_len < (off_t)sizeof(buf)) {
                                        if ((int)G.content_len <= 0)
                                                break;
                                        rdsz = (unsigned)G.content_len;