nspawn: use STR_IN_SET() where we can

This commit is contained in:
Lennart Poettering 2018-02-26 15:30:05 +01:00
parent c5b82d86b5
commit 5018c0c9e8
1 changed files with 2 additions and 1 deletions

View File

@ -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();