mirror of
https://github.com/systemd/systemd.git
synced 2025-03-21 02:50:18 +03:00
udev: replace '!= _UDEV_BUILTIN_INVALID' -> '>= 0'
No functional change, just refactoring.
This commit is contained in:
parent
5bb83e3f30
commit
7db4bdcd40
@ -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);
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user