]> git.ozlabs.org Git - ccan/blobdiff - ccan/crcsync/test/run-crash.c
alloc: implement alloc_visualize().
[ccan] / ccan / crcsync / test / run-crash.c
index 9987f8dc1d91d34e1d7af3199f532a310bec5651..b187bac401be4f7ce4676aaa6c68c72704bd1d3f 100644 (file)
@@ -1,8 +1,8 @@
 /* This used to crash us on 64-bit; submitted by
    Alex Wulms <alex.wulms@scarlet.be> */
-#include "crcsync/crcsync.h"
-#include "crcsync/crcsync.c"
-#include "tap/tap.h"
+#include <ccan/crcsync/crcsync.h>
+#include <ccan/crcsync/crcsync.c>
+#include <ccan/tap/tap.h>
 #include <stdlib.h>
 #include <stdbool.h>
 
 
 typedef struct {
        int block_count;
-       unsigned int *crcs;
+       uint64_t *crcs;
 } crc_info_t;
 
 static void crcblocks(crc_info_t *crc_info, char *data, int datalen, int blocksize)
 {
        crc_info->block_count = (datalen+blocksize-1)/blocksize;
-       crc_info->crcs = malloc(sizeof(unsigned int)*(crc_info->block_count + 1));
-       crc_of_blocks(data, datalen, blocksize, 30, crc_info->crcs);
+       crc_info->crcs = malloc(sizeof(uint64_t)*(crc_info->block_count + 1));
+       crc_of_blocks(data, datalen, blocksize, 60, crc_info->crcs);
 }
 
 #define BLOCKSIZE 5
@@ -61,7 +61,7 @@ int main(int argc, char *argv[])
        plan_tests(ARRAY_SIZE(expected) + 2);
        crcblocks(&crc_info1, data1, strlen(data1), BLOCKSIZE);
 
-       crcctx = crc_context_new(BLOCKSIZE, 30, crc_info1.crcs, crc_info1.block_count,
+       crcctx = crc_context_new(BLOCKSIZE, 60, crc_info1.crcs, crc_info1.block_count,
                                 tailsize);
        while ( offset < len2)
        {