From: Alan Jenkins Date: Mon, 8 Sep 2008 19:59:27 +0000 (+0200) Subject: remove redundant string copy in udev_rules_apply_format() X-Git-Tag: 174~1581 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b738db6eb3bf9221509f3dec8044c19bb48cb48;p=systemd remove redundant string copy in udev_rules_apply_format() --- 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); }