From ae835bc75f7ebaec1a685259be3a26503bf81d24 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 31 Aug 2017 10:25:48 +0200 Subject: [PATCH] bus-unit-util: use STR_IN_SET() where appropriate --- src/shared/bus-unit-util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared/bus-unit-util.c b/src/shared/bus-unit-util.c index d38eede..c024f64 100644 --- a/src/shared/bus-unit-util.c +++ b/src/shared/bus-unit-util.c @@ -1227,7 +1227,7 @@ static int check_wait_response(BusWaitForJobs *d, bool quiet, const char* const* log_error("Operation on or unit type of %s not supported on this system.", strna(d->name)); else if (streq(d->result, "collected")) log_error("Queued job for %s was garbage collected.", strna(d->name)); - else if (!streq(d->result, "done") && !streq(d->result, "skipped")) { + else if (!STR_IN_SET(d->result, "done", "skipped")) { if (d->name) { _cleanup_free_ char *result = NULL; int q; @@ -1254,7 +1254,7 @@ static int check_wait_response(BusWaitForJobs *d, bool quiet, const char* const* r = -EPROTO; else if (streq(d->result, "unsupported")) r = -EOPNOTSUPP; - else if (!streq(d->result, "done") && !streq(d->result, "skipped")) + else if (!STR_IN_SET(d->result, "done", "skipped")) r = -EIO; return r; -- 2.7.4