chiark / gitweb /
util: fix misuse of memcmp
[elogind.git] / src / shared / util.c
index b4ed2c407c4ad6d544adf5899760991f9ae05191..c71293106f228910d52323957b78e1baa9cbaf4b 100644 (file)
@@ -5379,7 +5379,7 @@ bool is_locale_utf8(void) {
                 goto out;
         }
 
-        if(streq(set, "UTF-8")) {
+        if (streq(set, "UTF-8")) {
                 cached_answer = true;
                 goto out;
         }
@@ -5919,7 +5919,7 @@ int shall_restore_state(void) {
                 return 1;
 
         FOREACH_WORD_QUOTED(w, l, line, state)
-                if (l == 23 && memcmp(w, "systemd.restore_state=0", 23))
+                if (l == 23 && strneq(w, "systemd.restore_state=0", 23))
                         return 0;
 
         return 1;