avoid shifting signed integers 31 bits
[gitweb.git] / builtin / receive-pack.c
index e6b93d026478dce208ab4c267d9b6e67fa856c8d..e35ed404371052a9ba0ecfdd1c02e03fb20d2039 100644 (file)
@@ -1597,7 +1597,7 @@ static void prepare_shallow_update(struct command *commands,
                                continue;
                        si->need_reachability_test[i]++;
                        for (k = 0; k < 32; k++)
-                               if (si->used_shallow[i][j] & (1 << k))
+                               if (si->used_shallow[i][j] & (1U << k))
                                        si->shallow_ref[j * 32 + k]++;
                }