]> git.ozlabs.org Git - ccan/commitdiff
64-bit fix (reported by Alex Wulms)
authorRusty Russell <rusty@rustcorp.com.au>
Tue, 31 Mar 2009 04:05:04 +0000 (14:35 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 31 Mar 2009 04:05:04 +0000 (14:35 +1030)
ccan/crcsync/crcsync.c

index ccc648a51bf4b4389bd4be8083542c5dafb35b7c..87f513ea90cc74576b2f5854ccd68431f8ed5e65 100644 (file)
@@ -268,7 +268,7 @@ long crc_read_flush(struct crc_context *ctx)
        }
 
        /* We matched (some of) what's left. */
        }
 
        /* We matched (some of) what's left. */
-       ret = -(ctx->num_crcs-1)-1;
+       ret = -((int)ctx->num_crcs-1)-1;
        ctx->buffer_start += final;
        ctx->literal_bytes -= final;
        return ret;
        ctx->buffer_start += final;
        ctx->literal_bytes -= final;
        return ret;