From: Zbigniew Jędrzejewski-Szmek Date: Thu, 16 Jul 2020 13:55:10 +0000 (+0200) Subject: udevadm: use STR_IN_SET(), add comment X-Git-Tag: v246-rc2~53^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5992f362bf022bb1ff24acd40d486623836d21a3;p=thirdparty%2Fsystemd.git udevadm: use STR_IN_SET(), add comment --- diff --git a/src/udev/udevadm-info.c b/src/udev/udevadm-info.c index b1209e6baf8..7eec84abd5d 100644 --- a/src/udev/udevadm-info.c +++ b/src/udev/udevadm-info.c @@ -44,17 +44,15 @@ static const char *arg_export_prefix = NULL; static usec_t arg_wait_for_initialization_timeout = 0; static bool skip_attribute(const char *name) { - static const char* const skip[] = { - "uevent", - "dev", - "modalias", - "resource", - "driver", - "subsystem", - "module", - }; - - return string_table_lookup(skip, ELEMENTSOF(skip), name) >= 0; + /* Those are either displayed separately or should not be shown at all. */ + return STR_IN_SET(name, + "uevent", + "dev", + "modalias", + "resource", + "driver", + "subsystem", + "module"); } typedef struct SysAttr {