Fix: possible null dereference
[lttng-tools.git] / src / bin / lttng-sessiond / tracker.h
index 1df4a0ce75c94fa5dd8e81031fb330be808618d8..78a12a6c760b245cf9d2dae46abd2499576ce7ee 100644 (file)
@@ -1,24 +1,14 @@
-#ifndef _LTT_TRACKER_H
-#define _LTT_TRACKER_H
-
 /*
- * Copyright (C) 2018 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License, version 2 only,
- * as published by the Free Software Foundation.
+ * Copyright (C) 2018 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * SPDX-License-Identifier: GPL-2.0-only
  *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#include <lttng/session.h>
+#ifndef _LTT_TRACKER_H
+#define _LTT_TRACKER_H
+
+#include <lttng/tracker.h>
 #include <urcu.h>
 #include <urcu/list.h>
 #include <urcu/rculfhash.h>
@@ -31,7 +21,7 @@ enum lttng_tracker_list_state {
 
 /* Tracker ID */
 struct lttng_tracker_list_node {
-       struct lttng_tracker_id id;
+       struct lttng_tracker_id *id;
 
        struct cds_list_head list_node;
        struct cds_lfht_node ht_node;
@@ -56,10 +46,9 @@ int lttng_tracker_list_remove(struct lttng_tracker_list *tracker_list,
 int lttng_tracker_id_lookup_string(enum lttng_tracker_type tracker_type,
                const struct lttng_tracker_id *id,
                int *result);
-ssize_t lttng_tracker_id_get_list(const struct lttng_tracker_list *tracker_list,
-               struct lttng_tracker_id **_ids);
+int lttng_tracker_id_get_list(const struct lttng_tracker_list *tracker_list,
+               struct lttng_tracker_ids **_ids);
 int lttng_tracker_id_set_list(struct lttng_tracker_list *tracker_list,
-               struct lttng_tracker_id *_ids,
-               size_t count);
+               const struct lttng_tracker_ids *_ids);
 
 #endif /* _LTT_TRACKER_H */
This page took 0.024274 seconds and 4 git commands to generate.