mirror of
https://github.com/systemd/systemd.git
synced 2024-11-02 19:21:53 +03:00
move variable inside condition
This commit is contained in:
parent
0ecfcbd4f7
commit
a7ef118174
@ -347,12 +347,12 @@ subst:
|
|||||||
l = util_strpcpy(&s, l, udev_device_get_devnode(dev));
|
l = util_strpcpy(&s, l, udev_device_get_devnode(dev));
|
||||||
break;
|
break;
|
||||||
case SUBST_NAME: {
|
case SUBST_NAME: {
|
||||||
size_t devlen = strlen(udev_get_dev_path(event->udev))+1;
|
|
||||||
|
|
||||||
if (event->name != NULL) {
|
if (event->name != NULL) {
|
||||||
l = util_strpcpy(&s, l, event->name);
|
l = util_strpcpy(&s, l, event->name);
|
||||||
dbg(event->udev, "substitute custom name '%s'\n", event->name);
|
dbg(event->udev, "substitute custom name '%s'\n", event->name);
|
||||||
} else {
|
} else {
|
||||||
|
size_t devlen = strlen(udev_get_dev_path(event->udev))+1;
|
||||||
|
|
||||||
l = util_strpcpy(&s, l, &udev_device_get_devnode(dev)[devlen]);
|
l = util_strpcpy(&s, l, &udev_device_get_devnode(dev)[devlen]);
|
||||||
dbg(event->udev, "substitute name'%s'\n", &udev_device_get_devnode(dev)[devlen]);
|
dbg(event->udev, "substitute name'%s'\n", &udev_device_get_devnode(dev)[devlen]);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user