]> git.ipfire.org Git - thirdparty/git.git/blobdiff - delta.h
test-ref-store: remove force-create argument for create-reflog
[thirdparty/git.git] / delta.h
diff --git a/delta.h b/delta.h
index 2df5fe13d954dfad4c6b1e80be7b45b281d7ef6d..8a56ec07992c75b021fca970d37e22f5e8a8bb48 100644 (file)
--- a/delta.h
+++ b/delta.h
@@ -90,15 +90,15 @@ static inline unsigned long get_delta_hdr_size(const unsigned char **datap,
                                               const unsigned char *top)
 {
        const unsigned char *data = *datap;
-       unsigned long cmd, size = 0;
+       size_t cmd, size = 0;
        int i = 0;
        do {
                cmd = *data++;
-               size |= (cmd & 0x7f) << i;
+               size |= st_left_shift(cmd & 0x7f, i);
                i += 7;
        } while (cmd & 0x80 && data < top);
        *datap = data;
-       return size;
+       return cast_size_t_to_ulong(size);
 }
 
 #endif