[LTP] [PATCH v4] syscalls/shmat0*: cleanup && convert to new API

Cyril Hrubis chrubis@suse.cz
Fri Jul 7 14:29:34 CEST 2017


Hi!
Pushed with a minor change, thanks.

diff --git a/testcases/kernel/syscalls/ipc/libnewipc/libnewipc.c b/testcases/kernel/syscalls/ipc/libnewipc/libnewipc.c
index ac50fdd27..a9771519d 100644
--- a/testcases/kernel/syscalls/ipc/libnewipc/libnewipc.c
+++ b/testcases/kernel/syscalls/ipc/libnewipc/libnewipc.c
@@ -88,10 +88,9 @@ void *probe_free_addr(const char *file, const int lineno)
        int shm_id = -1;
        key_t probe_key = 0;
 
-       if (!probe_key)
-               probe_key = GETIPCKEY();
+       probe_key = GETIPCKEY();

  We initialized the probe_key to zero 0 here so there is no need for the if ().


-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list