[PATCH] fix-trailing-space-ethernet-mac.patch

Andy Green andy at openmoko.com
Fri Feb 20 05:58:17 CET 2009


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 <werner at openmoko.org>
Signed-off-by: Andy Green <andy at openmoko.com>
---

 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;
 




More information about the openmoko-kernel mailing list