summaryrefslogtreecommitdiff
path: root/src/udev/udevadm-test-builtin.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/udev/udevadm-test-builtin.c')
-rw-r--r--src/udev/udevadm-test-builtin.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/udev/udevadm-test-builtin.c b/src/udev/udevadm-test-builtin.c
index e63b1f4eb7..ef788b0e02 100644
--- a/src/udev/udevadm-test-builtin.c
+++ b/src/udev/udevadm-test-builtin.c
@@ -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);