commit 9f372e48c6cfbe30974069e3343a856135e43a47
parent 15705a1447f2bcefc6839f272791bf1a78025174
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Tue, 26 Mar 2024 08:36:44 +0100
tests/cc: Fix 0155-struct_compl
The variable x was not defined in any place and the comparision in main
was inverted making it true only when &x was NULL.
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/cc/execute/0155-struct_compl.c b/tests/cc/execute/0155-struct_compl.c
@@ -4,10 +4,10 @@ int foo();
int main()
{
extern struct X x;
- return &x != 0;
+ return &x == 0;
}
-struct X {int v;};
+struct X {int v;} x;
int foo()
{