Cleanup: sessiond modprobe.c: coding style
[lttng-tools.git] / src / bin / lttng-sessiond / modprobe.c
index a28356b423129958728f0ee66a4029163214a965..b5b9d8cb793c2d6bbffc156d0ea8f6d314a4b0c7 100644 (file)
@@ -17,6 +17,7 @@
  */
 
 #define _GNU_SOURCE
+#define _LGPL_SOURCE
 #include <assert.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -98,8 +99,8 @@ static struct kern_modules_param *probes;
 static int nr_probes;
 static int probes_capacity;
 
-void modprobe_remove_lttng(const struct kern_modules_param *modules,
-                          int entries, int required)
+static void modprobe_remove_lttng(const struct kern_modules_param *modules,
+               int entries, int required)
 {
        int ret = 0, i;
        char modprobe[256];
@@ -351,10 +352,11 @@ static int append_list_to_probes(const char *list)
 {
        char *next;
        int index = nr_probes, ret;
+       char *tmp_list;
 
        assert(list);
 
-       char *tmp_list = strdup(list);
+       tmp_list = strdup(list);
        if (!tmp_list) {
                PERROR("strdup temp list");
                return -ENOMEM;
@@ -435,8 +437,8 @@ int modprobe_lttng_data(void)
        } else {
                /* Default probes. */
                int def_len = ARRAY_SIZE(kern_modules_probes_default);
-               probes = zmalloc(sizeof(*probes) * def_len);
 
+               probes = zmalloc(sizeof(*probes) * def_len);
                if (!probes) {
                        PERROR("malloc probe list");
                        return -ENOMEM;
This page took 0.023296 seconds and 4 git commands to generate.