From: Rusty Russell Date: Tue, 31 Mar 2009 04:05:04 +0000 (+1030) Subject: 64-bit fix (reported by Alex Wulms) X-Git-Url: http://git.ozlabs.org/?p=ccan;a=commitdiff_plain;h=4df5a75fd90bfcd42dedb3bfa83e85b57fd9f63c 64-bit fix (reported by Alex Wulms) --- diff --git a/ccan/crcsync/crcsync.c b/ccan/crcsync/crcsync.c index ccc648a5..87f513ea 100644 --- a/ccan/crcsync/crcsync.c +++ b/ccan/crcsync/crcsync.c @@ -268,7 +268,7 @@ long crc_read_flush(struct crc_context *ctx) } /* 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;