fetch-pack: eliminate spurious error messages
[gitweb.git] / vcs-svn / fast_export.c
index 854b328d43955f28096533477190a618f9346ae0..1f04697866bd481e24f17e0833c1c2d29c8e12e2 100644 (file)
@@ -254,7 +254,7 @@ static int parse_ls_response(const char *response, uint32_t *mode,
        }
 
        /* Mode. */
-       if (response_end - response < strlen("100644") ||
+       if (response_end - response < (signed) strlen("100644") ||
            response[strlen("100644")] != ' ')
                die("invalid ls response: missing mode: %s", response);
        *mode = 0;
@@ -267,7 +267,7 @@ static int parse_ls_response(const char *response, uint32_t *mode,
        }
 
        /* ' blob ' or ' tree ' */
-       if (response_end - response < strlen(" blob ") ||
+       if (response_end - response < (signed) strlen(" blob ") ||
            (response[1] != 'b' && response[1] != 't'))
                die("unexpected ls response: not a tree or blob: %s", response);
        response += strlen(" blob ");