diff options
author | Thomas Hindoe Paaboel Andersen <phomes@gmail.com> | 2013-02-13 18:13:22 +0100 |
---|---|---|
committer | Thomas Hindoe Paaboel Andersen <phomes@gmail.com> | 2013-02-13 18:14:20 +0100 |
commit | 090be8653471e1abe3f1cdd32eaad0fbd65f85cd (patch) | |
tree | 760849764326e78d458ff7019ac8b3f2d88245d8 /src/udev/udev-event.c | |
parent | b05105f0a80bcf2f2d18e9e33f740d7d04fca633 (diff) |
use streq instead of strcmp
Diffstat (limited to 'src/udev/udev-event.c')
-rw-r--r-- | src/udev/udev-event.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c index ef9fc61c64..efd9b6d71d 100644 --- a/src/udev/udev-event.c +++ b/src/udev/udev-event.c @@ -784,7 +784,7 @@ int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules, if (udev_device_get_subsystem(dev) == NULL) return -1; - if (strcmp(udev_device_get_action(dev), "remove") == 0) { + if (streq(udev_device_get_action(dev), "remove")) { udev_device_read_db(dev, NULL); udev_device_delete_db(dev); udev_device_tag_index(dev, NULL, false); @@ -812,8 +812,8 @@ int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules, udev_rules_apply_to_event(rules, event, sigmask); /* rename a new network interface, if needed */ - if (udev_device_get_ifindex(dev) > 0 && strcmp(udev_device_get_action(dev), "add") == 0 && - event->name != NULL && strcmp(event->name, udev_device_get_sysname(dev)) != 0) { + if (udev_device_get_ifindex(dev) > 0 && streq(udev_device_get_action(dev), "add") && + event->name != NULL && !streq(event->name, udev_device_get_sysname(dev))) { char syspath[UTIL_PATH_SIZE]; char *pos; |