]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/basic/xml.c
Add SPDX license identifiers to source files under the LGPL
[thirdparty/systemd.git] / src / basic / xml.c
index 8126bce212622caffea5d5cc75c5e540b5aa0989..639c3438a01eec4c9309b90380dad2ebf87d2834 100644 (file)
@@ -1,5 +1,4 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
+/* SPDX-License-Identifier: LGPL-2.1+ */
 /***
   This file is part of systemd.
 
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
+#include <stddef.h>
 #include <string.h>
 
+#include "macro.h"
 #include "string-util.h"
-#include "util.h"
 #include "xml.h"
 
 enum {
@@ -208,7 +209,7 @@ int xml_tokenize(const char **p, char **name, void **state, unsigned *line) {
                         if (*c == '=') {
                                 c++;
 
-                                if (*c == '\'' || *c == '\"') {
+                                if (IN_SET(*c, '\'', '\"')) {
                                         /* Tag with a quoted value */
 
                                         e = strchr(c+1, *c);