[LTP] [COMMITTED] [PATCH 5/7] syscalls/inotify05: Cleanup
Cyril Hrubis
chrubis@suse.cz
Fri Mar 2 16:48:39 CET 2018
* Make use of SAFE_MACROS() in cleanup
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
---
testcases/kernel/syscalls/inotify/inotify05.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/testcases/kernel/syscalls/inotify/inotify05.c b/testcases/kernel/syscalls/inotify/inotify05.c
index 2d9b299f5..2d8897e5d 100644
--- a/testcases/kernel/syscalls/inotify/inotify05.c
+++ b/testcases/kernel/syscalls/inotify/inotify05.c
@@ -173,8 +173,8 @@ static void cleanup(void)
}
- if (fd_notify > 0 && close(fd_notify) == -1)
- tst_res(TWARN, "close(%d) failed", fd_notify);
+ if (fd_notify > 0)
+ SAFE_CLOSE(fd_notify);
}
static struct tst_test test = {
--
2.13.6
More information about the ltp
mailing list