Cleanup: standardise include path
[lttng-ust.git] / liblttng-ust / lttng-ust-elf.c
index c073e7a545b64d349d3d7bb56932a24b9025f657..b7c0acb5d0d04c7def84ed4de4bfa85eadf3f0e3 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
  */
 
-#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 +252,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.023877 seconds and 4 git commands to generate.