]> arthur.barton.de Git - bup.git/blobdiff - lib/bup/_helpers.c
write_idx: make the 64-bit offset count uint32_t not int
[bup.git] / lib / bup / _helpers.c
index cf31d0aac2630eb44f35398dfa66e12f058875ad..f47de73a07d0e4a2734f88caa13bb0fc392f6280 100644 (file)
@@ -1087,7 +1087,7 @@ static PyObject *write_idx(PyObject *self, PyObject *args)
     PyObject *part;
     unsigned int total = 0;
     uint32_t count;
-    int i, ofs64_count;
+    int i;
     uint32_t *fan_ptr, *crc_ptr, *ofs_ptr;
     uint64_t *ofs64_ptr;
     struct sha *sha_ptr;
@@ -1119,7 +1119,7 @@ static PyObject *write_idx(PyObject *self, PyObject *args)
     ofs64_ptr = (uint64_t *)&ofs_ptr[total];
 
     count = 0;
-    ofs64_count = 0;
+    uint32_t ofs64_count = 0;
     for (i = 0; i < FAN_ENTRIES; ++i)
     {
        part = PyList_GET_ITEM(idx, i);