X-Git-Url: http://git.scottworley.com/tl-append/blobdiff_plain/d40078e9e37db7c291a2ed6878e72bc4d5924e5d..9b76e9d2c7bdd413e36432b64a0022852a484dea:/tl-append-test.c?ds=sidebyside diff --git a/tl-append-test.c b/tl-append-test.c index e712c6f..ee5d3f7 100644 --- a/tl-append-test.c +++ b/tl-append-test.c @@ -171,7 +171,7 @@ static void test_encode_time() { if (tt == (time_t)-1) die_err("Can't pack time?"); - const char *encoded = encode_time(tt); + char *encoded = encode_time(tt); /* Loose check to allow for daylight savings time changes between the current * time and the target time. :( */ assert(encoded[0] == '2'); @@ -194,6 +194,7 @@ static void test_encode_time() { assert(encoded[17] == '1'); assert(encoded[18] == '6'); assert(encoded[19] == '\0'); + free(encoded); } static FILE *take_lock(FILE *f, char *lock_type) {