]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix another 32-bit warning in the spooling code
authorNick Mathewson <nickm@torproject.org>
Wed, 29 Mar 2017 07:07:51 +0000 (09:07 +0200)
committerNick Mathewson <nickm@torproject.org>
Wed, 29 Mar 2017 07:07:51 +0000 (09:07 +0200)
src/or/dirserv.c

index 0e899a759c5090ecf3c60806519866ae0160e144..70b0b22f2526607b0d3a828809e0478030185dce 100644 (file)
@@ -3522,7 +3522,7 @@ spooled_resource_flush_some(spooled_resource_t *spooled,
     remaining = cached->dir_z_len - spooled->cached_dir_offset;
     if (BUG(remaining < 0))
       return SRFS_ERR;
-    ssize_t bytes = MIN(DIRSERV_CACHED_DIR_CHUNK_SIZE, remaining);
+    ssize_t bytes = (ssize_t) MIN(DIRSERV_CACHED_DIR_CHUNK_SIZE, remaining);
     if (conn->zlib_state) {
       connection_write_to_buf_zlib(cached->dir_z + spooled->cached_dir_offset,
                                    bytes, conn, 0);