Rename C++ header files to .hpp
[lttng-tools.git] / src / common / fd-tracker / fd-tracker.cpp
index f1058aa523cdd3f0ded6b0689bc033f6f214f144..9c6f031b0b6dc6e4995dde7d72f50fc158c06824 100644 (file)
 #include <sys/stat.h>
 #include <sys/types.h>
 
-#include <common/defaults.h>
-#include <common/error.h>
-#include <common/fs-handle-internal.h>
-#include <common/hashtable/hashtable.h>
-#include <common/hashtable/utils.h>
-#include <common/macros.h>
-#include <common/optional.h>
+#include <common/defaults.hpp>
+#include <common/error.hpp>
+#include <common/fs-handle-internal.hpp>
+#include <common/hashtable/hashtable.hpp>
+#include <common/hashtable/utils.hpp>
+#include <common/macros.hpp>
+#include <common/optional.hpp>
 
-#include "fd-tracker.h"
-#include "inode.h"
+#include "fd-tracker.hpp"
+#include "inode.hpp"
 
 /* Tracker lock must be taken by the user. */
 #define TRACKED_COUNT(tracker)                                 \
@@ -130,6 +130,8 @@ static struct {
        unsigned long value;
 } seed = {
        .lock = PTHREAD_MUTEX_INITIALIZER,
+       .initialized = false,
+       .value = 0,
 };
 
 static int match_fd(struct cds_lfht_node *node, const void *key);
@@ -501,7 +503,7 @@ struct fs_handle *fd_tracker_open_fs_handle(struct fd_tracker *tracker,
                .flags = flags,
                .mode = {
                        .is_set = !!mode,
-                       .value = mode ? *mode : 0,
+                       .value = static_cast<mode_t>(mode ? *mode : 0),
                }
        };
 
This page took 0.02391 seconds and 4 git commands to generate.