msgget05: Fix build on centos 6
PATCH 1/1 msgget05: Fix build on centos 6
Which has old gcc that does not allow variables decleared inside of the for loop.
Signed-off-by Cyril Hrubis <[email protected]>
--- testcases/kernel/syscalls/ipc/msgget/msgget05.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
testcases/kernel/syscalls/ipc/msgget/msgget05.c +3 -1
@@ -51,7 +51,9 @@ static void setup(void)static void cleanup (void ) { -for (int i =0 ; i <2 ; i++) { +int i; + +for (i =0 ; i <2 ; i++) {if (queue_id[i] !=-1 )SAFE_MSGCTL (queue_id[i],IPC_RMID ,NULL ); }
Signature · 1 line
2.26.2