Move to kernel style SPDX license identifiers
[babeltrace.git] / src / bindings / python / bt2 / bt2 / native_bt_autodisc.i.h
index aac92e129031fe77f2e26a01b583b5010e27506e..43e9dc82e534f6e244c6b04c89b1c6f48e14f840 100644 (file)
@@ -1,25 +1,7 @@
 /*
- * The MIT License (MIT)
+ * SPDX-License-Identifier: MIT
  *
  * Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
  */
 
 #include <autodisc/autodisc.h>
@@ -47,6 +29,7 @@
  * This function can also return None, if it failed to allocate memory
  * for the return value and status code.
  */
+static
 bt_value *bt_bt2_auto_discover_source_components(const bt_value *inputs,
                const bt_plugin_set *plugin_set)
 {
@@ -69,9 +52,10 @@ bt_value *bt_bt2_auto_discover_source_components(const bt_value *inputs,
 
        result = bt_value_map_create();
        if (!result) {
-               static const char * const err = "Failed to create a map value.";
-               BT_LOGE_STR(err);
-               BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_UNKNOWN(module_name, err);
+#define BT_FMT "Failed to create a map value."
+               BT_LOGE_STR(BT_FMT);
+               BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_UNKNOWN(module_name, BT_FMT);
+#undef BT_FMT
                PyErr_NoMemory();
                goto end;
        }
This page took 0.023405 seconds and 4 git commands to generate.