]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/basic/device-nodes.c
Merge pull request #8575 from keszybz/non-absolute-paths
[thirdparty/systemd.git] / src / basic / device-nodes.c
index ec58cfdd4cd207a594df22e04b40cff8766a04b8..bbbe563fa1f36e2bbad8270a6ddaa1021e79d78b 100644 (file)
@@ -1,22 +1,8 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
+/* SPDX-License-Identifier: LGPL-2.1+ */
 /***
   This file is part of systemd.
 
   Copyright 2008-2011 Kay Sievers
-
-  systemd 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.
-
-  systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
 #include <errno.h>
@@ -41,7 +27,7 @@ int whitelisted_char_for_devnode(char c, const char *white) {
 int encode_devnode_name(const char *str, char *str_enc, size_t len) {
         size_t i, j;
 
-        if (str == NULL || str_enc == NULL)
+        if (!str || !str_enc)
                 return -EINVAL;
 
         for (i = 0, j = 0; str[i] != '\0'; i++) {