]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/locale/keymap-util.c
Add SPDX license identifiers to source files under the LGPL
[thirdparty/systemd.git] / src / locale / keymap-util.c
index 7068603f0fe0c5dbd432b443fae6f2a9fe0a3acf..1140ce299cc2a8615c87807f3609f339000464b4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1+ */
 /***
   This file is part of systemd.
 
@@ -39,7 +40,7 @@ static bool startswith_comma(const char *s, const char *prefix) {
         if (!s)
                 return false;
 
-        return *s == ',' || *s == '\0';
+        return IN_SET(*s, ',', '\0');
 }
 
 static const char* strnulldash(const char *s) {
@@ -177,7 +178,7 @@ static int x11_read_data(Context *c) {
                 char_array_0(line);
                 l = strstrip(line);
 
-                if (l[0] == 0 || l[0] == '#')
+                if (IN_SET(l[0], 0, '#'))
                         continue;
 
                 if (in_section && first_word(l, "Option")) {
@@ -425,7 +426,7 @@ static int read_next_mapping(const char* filename,
                 (*n)++;
 
                 l = strstrip(line);
-                if (l[0] == 0 || l[0] == '#')
+                if (IN_SET(l[0], 0, '#'))
                         continue;
 
                 r = strv_split_extract(&b, l, WHITESPACE, EXTRACT_QUOTES);