Explorar o código

chunker: n needs to be a signed size_t

... as it is also used for the read() return value, which can be negative in case of errors.
Thomas Waldmann %!s(int64=10) %!d(string=hai) anos
pai
achega
3be55bedd3
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      borg/_chunker.c

+ 1 - 1
borg/_chunker.c

@@ -127,7 +127,7 @@ chunker_free(Chunker *c)
 static int
 chunker_fill(Chunker *c)
 {
-    size_t n;
+    ssize_t n;
     PyObject *data;
     memmove(c->data, c->data + c->last, c->position + c->remaining - c->last);
     c->position -= c->last;