From 4a3a61c179ecf1338c71f0489c7a5a7d1bd41fe9 Mon Sep 17 00:00:00 2001 From: Jonathan Rajotte Date: Tue, 25 Jul 2017 11:14:55 -0400 Subject: [PATCH] Cleanup: remove dead assignment MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Artifact of refactoring done in f8f3885cc52af9d3c951da78989d6f4a25270411 Signed-off-by: Jonathan Rajotte Signed-off-by: Jérémie Galarneau --- src/common/index/index.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/common/index/index.c b/src/common/index/index.c index c94ec701c..ee73a0324 100644 --- a/src/common/index/index.c +++ b/src/common/index/index.c @@ -223,11 +223,7 @@ struct lttng_index_file *lttng_index_file_open(const char *path_name, DBG("Index opening file %s in read only", fullpath); read_fd = open(fullpath, O_RDONLY); if (read_fd < 0) { - if (errno == ENOENT) { - ret = -ENOENT; - } else { - PERROR("opening index in read-only"); - } + PERROR("opening index in read-only"); goto error; } @@ -271,7 +267,6 @@ error_close: PERROR("close read fd %d", read_fd); } } - ret = -1; error: free(index_file); -- 2.34.1