tests: Make test_per_application_leaks more robust
[lttng-tools.git] / tests / utils / testapp / gen-kernel-test-events / gen-kernel-test-events.c
index 820937902b70a934cfd791130f87801517214833..af8b76a17314d96078912f12f05d3167d5a8f2fc 100644 (file)
@@ -1,21 +1,13 @@
 /*
- * Copyright (C) 2017 Francis Deslauriers <francis.deslauriers@efficios.com>
- * Copyright (C) 2018 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright (C) 2017 Francis Deslauriers <francis.deslauriers@efficios.com>
+ * Copyright (C) 2018 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
- * This library is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published by the
- * Free Software Foundation; version 2.1 of the License.
+ * SPDX-License-Identifier: LGPL-2.1-only
  *
- * This library 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 Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
  */
 
+#include "utils.h"
+
 #include <fcntl.h>
 #include <stdio.h>
 #include <string.h>
@@ -23,8 +15,6 @@
 #include <sys/types.h>
 #include <unistd.h>
 
-#include "utils.h"
-
 #define LTTNG_MODULES_FILE "/proc/lttng-test-filter-event"
 
 /*
@@ -41,8 +31,7 @@ int main(int argc, char **argv)
 
        if (argc != 3) {
                fprintf(stderr, "Error: Missing argument\n");
-               fprintf(stderr, "USAGE: %s PATH_WAIT_FILE NR_EVENTS\n",
-                               argv[0]);
+               fprintf(stderr, "USAGE: %s PATH_WAIT_FILE NR_EVENTS\n", argv[0]);
                ret = -1;
                goto end;
        }
@@ -70,7 +59,7 @@ int main(int argc, char **argv)
        }
 
        len = write(fd, nr_events_str, strlen(nr_events_str) + 1);
-       if (len != strlen(nr_events_str) + 1) {
+       if (len != (ssize_t) strlen(nr_events_str) + 1) {
                perror("write");
                ret = -1;
        } else {
This page took 0.025675 seconds and 4 git commands to generate.