]> git.ipfire.org Git - thirdparty/kmod.git/blobdiff - testsuite/test-new-module.c
ci: add clang-format action
[thirdparty/kmod.git] / testsuite / test-new-module.c
index ae9716f0f2d2c8d974483f18bbbc7a49e894131c..866526de68ba9b1a1595b3038d98928c972af9c9 100644 (file)
@@ -1,18 +1,6 @@
+// SPDX-License-Identifier: LGPL-2.1-or-later
 /*
  * Copyright (C) 2012-2013  ProFUSION embedded systems
- *
- * This program 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; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * 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
- * 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, see <http://www.gnu.org/licenses/>.
  */
 
 #include <errno.h>
 #include <string.h>
 #include <unistd.h>
 
-#include <libkmod.h>
+#include <libkmod/libkmod.h>
 
 #include "testsuite.h"
 
 static int from_name(const struct test *t)
 {
-       static const char *modnames[] = {
+       static const char *const modnames[] = {
+               // clang-format off
                "ext4",
                "balbalbalbbalbalbalbalbalbalbal",
                "snd-hda-intel",
                "snd-timer",
                "iTCO_wdt",
                NULL,
+               // clang-format on
        };
-       const char **p;
+       const char *const *p;
        struct kmod_ctx *ctx;
        struct kmod_module *mod;
        const char *null_config = NULL;
@@ -72,11 +62,11 @@ DEFINE_TEST(from_name,
 
 static int from_alias(const struct test *t)
 {
-       static const char *modnames[] = {
+       static const char *const modnames[] = {
                "ext4.*",
                NULL,
        };
-       const char **p;
+       const char *const *p;
        struct kmod_ctx *ctx;
        int err;