From: Guillem Jover Date: Sat, 27 Nov 2021 20:09:18 +0000 (+0100) Subject: test: Check that strdup() does not fail X-Git-Tag: 0.11.4~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1eba40602175e9ee231cba7577c3eee975680dcb;p=thirdparty%2Flibbsd.git test: Check that strdup() does not fail Warned-by: gcc --- diff --git a/test/fgetln.c b/test/fgetln.c index 2eafa84..e137fe7 100644 --- a/test/fgetln.c +++ b/test/fgetln.c @@ -96,6 +96,7 @@ test_fgetln_multi(void) char *str; str = strdup("A\n"); + assert(str); str[0] += i; files[i].line_alloc = str;