You are not adding a space to the string, you are biasing the value by a
space and then incrementing the pointer. Do you want to just set it?
Andy Green wrote:
There's no trailing space after the last mac address addition, it
was broken before the recent patch adding the second mac address.
Also, we don't need to add the first space by hand if it's unconditionally
added in the string afterwards.
Reported-by: Werner Almesberger <[email protected]>
Signed-off-by: Andy Green <[email protected]>
---
src/cpu/s3c2442/gta02.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/src/cpu/s3c2442/gta02.c b/src/cpu/s3c2442/gta02.c
index ce8b5a0..61ca75c 100644
--- a/src/cpu/s3c2442/gta02.c
+++ b/src/cpu/s3c2442/gta02.c
@@ -605,11 +605,10 @@ char * append_device_specific_cmdline_gta02(char *
cmdline)
cmdline += strlen(strcpy(cmdline, " g_ether.host_addr="));
cmdline += strlen(strcpy(cmdline, &mac[2]));
- *cmdline += ' ' ;
cmdline += strlen(strcpy(cmdline, " g_ether.dev_addr="));
cmdline += strlen(strcpy(cmdline, &mac[2]));
- *cmdline += ' ' ;
+ *cmdline++ += ' ' ;
bail:
this_kernel = real_kernel;