diff options
author | Johannes Löthberg <johannes@kyriasis.com> | 2015-01-18 15:45:20 +0100 |
---|---|---|
committer | Johannes Löthberg <johannes@kyriasis.com> | 2015-01-19 00:25:41 +0100 |
commit | 5079d22319930f47647d1ed9507ad07ec0b922d0 (patch) | |
tree | 4066dc439ad7edda9e482e82f5dee14627234f78 | |
parent | 6b0750a000900d2ff775e6792797d64174e509c1 (diff) | |
download | sds-5079d22319930f47647d1ed9507ad07ec0b922d0.tar.xz |
test.c: Make test_list static const, fix oldfree type
-rw-r--r-- | src/test.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); |