From 5018c0c9e8062c38e41da54759b3088a241d734b Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 26 Feb 2018 15:30:05 +0100 Subject: [PATCH] nspawn: use STR_IN_SET() where we can --- src/nspawn/nspawn-setuid.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nspawn/nspawn-setuid.c b/src/nspawn/nspawn-setuid.c index 029c4e7..a98fcc6 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(); -- 2.7.4