read-cache: fix an -Wmaybe-uninitialized warning
[gitweb.git] / diffcore-rename.c
index 9ca0eaec70b6e973af8b1aec19a8f59f40384bf9..245e999fe5c6e9da62303423570d07aae5a88897 100644 (file)
@@ -392,6 +392,8 @@ static int too_many_rename_candidates(int num_create,
         *
         *    num_create * num_src > rename_limit * rename_limit
         */
+       if (rename_limit <= 0)
+               rename_limit = 32767;
        if ((num_create <= rename_limit || num_src <= rename_limit) &&
            ((uint64_t)num_create * (uint64_t)num_src
             <= (uint64_t)rename_limit * (uint64_t)rename_limit))