From: Lennart Poettering Date: Mon, 26 Feb 2018 14:30:05 +0000 (+0100) Subject: nspawn: use STR_IN_SET() where we can X-Git-Tag: v238~37^2~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5018c0c9e8062c38e41da54759b3088a241d734b;p=thirdparty%2Fsystemd.git nspawn: use STR_IN_SET() where we can --- diff --git a/src/nspawn/nspawn-setuid.c b/src/nspawn/nspawn-setuid.c index 029c4e79543..a98fcc6844d 100644 --- a/src/nspawn/nspawn-setuid.c +++ b/src/nspawn/nspawn-setuid.c @@ -32,6 +32,7 @@ #include "process-util.h" #include "signal-util.h" #include "string-util.h" +#include "strv.h" #include "user-util.h" #include "util.h" @@ -104,7 +105,7 @@ int change_uid_gid(const char *user, char **_home) { assert(_home); - if (!user || streq(user, "root") || streq(user, "0")) { + if (!user || STR_IN_SET(user, "root", "0")) { /* Reset everything fully to 0, just in case */ r = reset_uid_gid();