chiark / gitweb /
udev: use startswith() and streq()
[elogind.git] / src / udev / udevadm-test-builtin.c
index e63b1f4..ef788b0 100644 (file)
@@ -95,7 +95,7 @@ static int adm_builtin(struct udev *udev, int argc, char *argv[])
         }
 
         /* add /sys if needed */
-        if (strncmp(syspath, "/sys", strlen("/sys")) != 0)
+        if (!startswith(syspath, "/sys"))
                 util_strscpyl(filename, sizeof(filename), "/sys", syspath, NULL);
         else
                 util_strscpy(filename, sizeof(filename), syspath);