From: kay.sievers@vrfy.org Date: Tue, 25 Nov 2003 06:27:20 +0000 (-0800) Subject: [PATCH] namedev.c strcat tweak X-Git-Tag: 008~40 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=6968d494d76ea0e6e326e23948d2428b53faccf8;hp=f7b4eca455c7dbf850d984892756f22dbd9ddc3d [PATCH] namedev.c strcat tweak 02-namedev.c-strcat-tweak.diff o cat the substitution to the already known end of the string instead of searching it another time --- diff --git a/namedev.c b/namedev.c index 21815b694..83852f9df 100644 --- a/namedev.c +++ b/namedev.c @@ -514,7 +514,7 @@ static void apply_format(struct udevice *udev, unsigned char *string) case 'b': if (strlen(udev->bus_id) == 0) break; - strcat(string, udev->bus_id); + strcat(pos, udev->bus_id); dbg("substitute bus_id '%s'", udev->bus_id); break; case 'n':