From 3b738db6eb3bf9221509f3dec8044c19bb48cb48 Mon Sep 17 00:00:00 2001 From: Alan Jenkins Date: Mon, 8 Sep 2008 21:59:27 +0200 Subject: [PATCH] remove redundant string copy in udev_rules_apply_format() --- udev/udev_rules.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/udev/udev_rules.c b/udev/udev_rules.c index b864599a..ce1f66ec 100644 --- a/udev/udev_rules.c +++ b/udev/udev_rules.c @@ -850,10 +850,8 @@ found: do { dbg(udevice->udev, "looking at '%s'\n", dev_parent->devpath); value = sysfs_attr_get_value(udevice->udev, dev_parent->devpath, attr); - if (value != NULL) { - strlcpy(temp2, value, sizeof(temp2)); + if (value != NULL) break; - } dev_parent = sysfs_device_get_parent(udevice->udev, dev_parent); } while (dev_parent != NULL); } -- 2.39.5