Move to kernel style SPDX license identifiers
[lttng-tools.git] / src / bin / lttng-sessiond / agent.c
index 310a7e8e1f7513dba73bd9d8d6a07ed16998eead..1926b0820fc808f4076e12b8110a4ce5fe34cbae 100644 (file)
@@ -1,19 +1,9 @@
 /*
- * Copyright (C) 2013 David Goulet <dgoulet@efficios.com>
- * Copyright (C) 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ * Copyright (C) 2013 David Goulet <dgoulet@efficios.com>
+ * Copyright (C) 2016 Jérémie Galarneau <jeremie.galarneau@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.
+ * SPDX-License-Identifier: GPL-2.0-only
  *
- * 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.
- *
- * 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.
  */
 
 #define _LGPL_SOURCE
@@ -143,7 +133,7 @@ static int ht_match_event(struct cds_lfht_node *node,
        }
 
        /* Filter expression */
-       if (!!event->filter_expression ^ !!key->filter_expression) {
+       if (!!event->filter_expression != !!key->filter_expression) {
                /* One has a filter expression, the other does not */
                goto no_match;
        }
@@ -708,7 +698,7 @@ void destroy_app_ctx(struct agent_app_ctx *ctx)
 }
 
 static
-struct agent_app_ctx *create_app_ctx(struct lttng_event_context *ctx)
+struct agent_app_ctx *create_app_ctx(const struct lttng_event_context *ctx)
 {
        struct agent_app_ctx *agent_ctx = NULL;
 
@@ -738,7 +728,7 @@ end:
  *
  * Return LTTNG_OK on success or else a LTTNG_ERR* code.
  */
-int agent_enable_context(struct lttng_event_context *ctx,
+int agent_enable_context(const struct lttng_event_context *ctx,
                enum lttng_domain_type domain)
 {
        int ret;
@@ -830,7 +820,8 @@ end:
  *
  * Return LTTNG_OK on success or else a LTTNG_ERR* code.
  */
-int disable_context(struct agent_app_ctx *ctx, enum lttng_domain_type domain)
+static int disable_context(struct agent_app_ctx *ctx,
+               enum lttng_domain_type domain)
 {
        int ret = LTTNG_OK;
        struct agent_app *app;
@@ -1166,7 +1157,7 @@ void agent_add_event(struct agent_event *event, struct agent *agt)
 /*
  * Unique add of a agent context to an agent object.
  */
-int agent_add_context(struct lttng_event_context *ctx, struct agent *agt)
+int agent_add_context(const struct lttng_event_context *ctx, struct agent *agt)
 {
        int ret = LTTNG_OK;
        struct agent_app_ctx *agent_ctx = NULL;
This page took 0.026868 seconds and 5 git commands to generate.