chiark / gitweb /
[PATCH] namedev.c strcat tweak
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>
Tue, 25 Nov 2003 06:27:20 +0000 (22:27 -0800)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 04:13:04 +0000 (21:13 -0700)
02-namedev.c-strcat-tweak.diff
  o cat the substitution to the already known end of the string instead of searching it another time

namedev.c

index 21815b694a2a524bc49b0effaeb3682ec048b604..83852f9df29abc52e9cac65140f353b750881b0a 100644 (file)
--- 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':