commit 012f7e29aaa299b713578f46b6cce807c2d40675
parent 392ff5e5970747862a91550c64e0a7455f2393f2
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Thu, 11 Nov 2021 08:14:05 +0100
tests/cc: Fix 0129-initi.c
The test was getting the content of a NULL pointer.
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tests/cc/execute/0129-initi.c b/tests/cc/execute/0129-initi.c
@@ -1,6 +1,7 @@
struct range {
long quant;
-} *a;
+} a[] = {1, 0};
+
long b;
int
@@ -8,4 +9,6 @@ main()
{
struct range r = a[0];
b = r.quant;
+
+ return (b == 1) ? 0 : 1;
}