Use compiler-agnostic defines to silence warning
[lttng-tools.git] / src / common / index / index.cpp
index b1c828303ab8ae05f5d3e01ec952a4260f5be20f..e24c48a474e2c5eec3a81fd519c1441e4c77d185 100644 (file)
@@ -40,7 +40,7 @@ _lttng_index_file_create_from_trace_chunk(struct lttng_trace_chunk *chunk,
        struct lttng_index_file *index_file;
        enum lttng_trace_chunk_status chunk_status;
        int ret;
-       struct fs_handle *fs_handle = NULL;
+       struct fs_handle *fs_handle = nullptr;
        ssize_t size_ret;
        struct ctf_packet_index_file_hdr hdr;
        char index_directory_path[LTTNG_PATH_MAX];
@@ -99,7 +99,7 @@ _lttng_index_file_create_from_trace_chunk(struct lttng_trace_chunk *chunk,
                chunk_status = (lttng_trace_chunk_status) lttng_trace_chunk_unlink_file(
                        chunk, index_file_path);
                if (chunk_status != LTTNG_TRACE_CHUNK_STATUS_OK &&
-                   !(chunk_status == LTTNG_TRACE_CHUNK_STATUS_ERROR && errno == ENOENT)) {
+                   (chunk_status != LTTNG_TRACE_CHUNK_STATUS_ERROR || errno != ENOENT)) {
                        goto error;
                }
        }
This page took 0.023418 seconds and 4 git commands to generate.