[LTP] [PATCH] syscalls/getpid01.c: Remove unneeded TTERRNO and status

Xiao Yang yangx.jy@cn.fujitsu.com
Thu Mar 4 03:21:27 CET 2021


Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
---
 testcases/kernel/syscalls/getpid/getpid01.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/testcases/kernel/syscalls/getpid/getpid01.c b/testcases/kernel/syscalls/getpid/getpid01.c
index 229172a64..326ee5840 100644
--- a/testcases/kernel/syscalls/getpid/getpid01.c
+++ b/testcases/kernel/syscalls/getpid/getpid01.c
@@ -15,7 +15,7 @@
 static void verify_getpid(void)
 {
 	pid_t pid_max, pid;
-	int status, i;
+	int i;
 
 	SAFE_FILE_SCANF("/proc/sys/kernel/pid_max", "%d\n", &pid_max);
 
@@ -28,11 +28,11 @@ static void verify_getpid(void)
 			if (1 < pid && pid <= pid_max)
 				tst_res(TPASS, "getpid() returns %d", pid);
 			else
-				tst_res(TFAIL | TTERRNO,
+				tst_res(TFAIL,
 					"getpid() returns out of range: %d", pid);
 			exit(0);
 		} else {
-			SAFE_WAIT(&status);
+			SAFE_WAIT(NULL);
 		}
 	}
 }
-- 
2.25.1





More information about the ltp mailing list