update-utmp: let's use STR_IN_SET() where it is pretty
authorLennart Poettering <lennart@poettering.net>
Thu, 20 Oct 2016 17:20:22 +0000 (19:20 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 20 Oct 2016 18:22:43 +0000 (14:22 -0400)
src/update-utmp/update-utmp.c

index 8ae4a8a..a8efe8e 100644 (file)
@@ -34,6 +34,7 @@
 #include "log.h"
 #include "macro.h"
 #include "special.h"
+#include "strv.h"
 #include "unit-name.h"
 #include "util.h"
 #include "utmp-wtmp.h"
@@ -107,7 +108,7 @@ static int get_current_runlevel(Context *c) {
                 if (r < 0)
                         return log_warning_errno(r, "Failed to get state: %s", bus_error_message(&error, r));
 
-                if (streq(state, "active") || streq(state, "reloading"))
+                if (STR_IN_SET(state, "active", "reloading"))
                         return table[i].runlevel;
         }