From 5079d22319930f47647d1ed9507ad07ec0b922d0 Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Sun, 18 Jan 2015 15:45:20 +0100 Subject: test.c: Make test_list static const, fix oldfree type --- src/test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/test.c b/src/test.c index 3d71f6f..d2ad304 100644 --- a/src/test.c +++ b/src/test.c @@ -27,7 +27,7 @@ bool sdsIncrLen_content (void); bool sdsIncrLen_len (void); bool sdsIncrLen_free (void); -struct test test_list [] = { +static const struct test test_list [] = { { "create a string and obtain the length", check_string_length }, { "create a string with specified length", create_with_length }, { "string concatenation", string_concat }, @@ -216,7 +216,7 @@ sdsIncrLen_free (void) { _sds_cleanup_ sds x = sdsnew("0"); x = sdsMakeRoomFor(x, 1); struct sdshdr *sh = (void*) (x-(sizeof(struct sdshdr))); - int oldfree = sh->free; + size_t oldfree = sh->free; x[1] = '1'; sdsIncrLen(x, 1); return (sh->free == oldfree-1); -- cgit v1.2.3-54-g00ecf