X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fcommon%2Findex%2Findex.c;h=ee73a0324c75467a7cd6706a6f9efa8b13b2659f;hb=4a3a61c179ecf1338c71f0489c7a5a7d1bd41fe9;hp=c94ec701c869f2df3bf61e2845409d3c46697131;hpb=0b0ac4a97d325a6938992f5c04987d5d48167a21;p=lttng-tools.git 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);