From e0833535c3548a2f2d8d0bc60d6d9705b5dbc0b5 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Fri, 4 Sep 2015 01:29:49 -0400 Subject: [PATCH 1/1] Cleanup: remove logically dead code Signed-off-by: Mathieu Desnoyers --- lttng-abi.c | 8 -------- lttng-syscalls.c | 4 ---- 2 files changed, 12 deletions(-) diff --git a/lttng-abi.c b/lttng-abi.c index bc0a0f6e..3572e58e 100644 --- a/lttng-abi.c +++ b/lttng-abi.c @@ -130,10 +130,6 @@ int lttng_abi_tracepoint_list(void) if (ret < 0) goto open_error; fd_install(file_fd, tracepoint_list_file); - if (file_fd < 0) { - ret = file_fd; - goto fd_error; - } return file_fd; open_error: @@ -174,10 +170,6 @@ int lttng_abi_syscall_list(void) if (ret < 0) goto open_error; fd_install(file_fd, syscall_list_file); - if (file_fd < 0) { - ret = file_fd; - goto fd_error; - } return file_fd; open_error: diff --git a/lttng-syscalls.c b/lttng-syscalls.c index 36efea47..5fa66660 100644 --- a/lttng-syscalls.c +++ b/lttng-syscalls.c @@ -1290,10 +1290,6 @@ int lttng_abi_syscall_list(void) if (ret < 0) goto open_error; fd_install(file_fd, syscall_list_file); - if (file_fd < 0) { - ret = file_fd; - goto fd_error; - } return file_fd; open_error: -- 2.34.1