diff --git a/src/udev/udev-dump.c b/src/udev/udev-dump.c index 918c966c4e..1dcc141042 100644 --- a/src/udev/udev-dump.c +++ b/src/udev/udev-dump.c @@ -121,7 +121,7 @@ void dump_event(UdevEvent *event, FILE *f) { ORDERED_HASHMAP_FOREACH_KEY(val, command, event->run_list) { UdevBuiltinCommand builtin_cmd = PTR_TO_UDEV_BUILTIN_CMD(val); - if (builtin_cmd != _UDEV_BUILTIN_INVALID) + if (builtin_cmd >= 0) fprintf(f, " RUN{builtin} : %s\n", command); else fprintf(f, " RUN{program} : %s\n", command); diff --git a/src/udev/udev-spawn.c b/src/udev/udev-spawn.c index 2d0f6455a5..22cb0089a4 100644 --- a/src/udev/udev-spawn.c +++ b/src/udev/udev-spawn.c @@ -343,7 +343,7 @@ void udev_event_execute_run(UdevEvent *event) { ORDERED_HASHMAP_FOREACH_KEY(val, command, event->run_list) { UdevBuiltinCommand builtin_cmd = PTR_TO_UDEV_BUILTIN_CMD(val); - if (builtin_cmd != _UDEV_BUILTIN_INVALID) { + if (builtin_cmd >= 0) { log_device_debug(event->dev, "Running built-in command \"%s\"", command); r = udev_builtin_run(event, builtin_cmd, command); if (r < 0)