]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/basic/user-util.c
Add SPDX license identifiers to source files under the LGPL
[thirdparty/systemd.git] / src / basic / user-util.c
index c619dad52769ecdb5e7f4387860df0b7bcdbffc8..24686591c2365ed13737e9e7a33476ccac2949ff 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1+ */
 /***
   This file is part of systemd.
 
@@ -543,8 +544,7 @@ bool valid_user_group_name(const char *u) {
                 if (!(*i >= 'a' && *i <= 'z') &&
                     !(*i >= 'A' && *i <= 'Z') &&
                     !(*i >= '0' && *i <= '9') &&
-                    *i != '_' &&
-                    *i != '-')
+                    !IN_SET(*i, '_', '-'))
                         return false;
         }