Commit 1eba40602175e9ee231cba7577c3eee975680dcb

Guillem Jover 2021-11-27T21:09:18

test: Check that strdup() does not fail Warned-by: gcc

1
2
3
4
5
6
7
8
9
10
11
12
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;