chiark / gitweb /
udev: use startswith() and streq()
[elogind.git] / src / udev / udev-event.c
index d330062..e6f405b 100644 (file)
@@ -133,7 +133,7 @@ size_t udev_event_apply_format(struct udev_event *event, const char *src, char *
                                 }
 
                                 for (i = 0; i < ELEMENTSOF(map); i++) {
-                                        if (strncmp(&from[1], map[i].name, strlen(map[i].name)) == 0) {
+                                        if (startswith(&from[1], map[i].name)) {
                                                 type = map[i].type;
                                                 from += strlen(map[i].name)+1;
                                                 goto subst;