commit 4f6b84ae2b0ddb9b0ed54470606262224148855f
parent 52549a2648ebf58b4d31fae7290ad5651638046c
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;
}