Cleanup: apply `include-what-you-use` guideline for `uint*_t`
[lttng-ust.git] / liblttng-ust / lttng-ust-elf.c
index c073e7a545b64d349d3d7bb56932a24b9025f657..5de3561fbeefcc71a56522f8763fb628dbdcede3 100644 (file)
 
 #define _GNU_SOURCE
 #define _LGPL_SOURCE
+#include <fcntl.h>
 #include <helper.h>
-#include <string.h>
 #include <lttng/align.h>
 #include <lttng/ust-elf.h>
-#include <sys/types.h>
+#include <stdbool.h>
+#include <stdint.h>
+#include <string.h>
 #include <sys/stat.h>
-#include <fcntl.h>
+#include <sys/types.h>
 #include <unistd.h>
-#include <stdbool.h>
+
 #include <ust-fd.h>
+
 #include "lttng-tracer-core.h"
 
 #define BUF_LEN        4096
@@ -250,6 +253,8 @@ struct lttng_ust_elf *lttng_ust_elf_create(const char *path)
                goto error;
        }
 
+       /* Initialize fd field to -1. 0 is a valid fd number */
+       elf->fd = -1;
 
        elf->path = strdup(path);
        if (!elf->path) {
This page took 0.024033 seconds and 4 git commands to generate.