svn commit: trunk/busybox/networking

Bernhard Fischer rep.nop at aon.at
Tue Oct 10 08:13:57 UTC 2006


On Sat, Oct 07, 2006 at 07:28:56AM -0700, vda at busybox.net wrote:
>Author: vda
>Date: 2006-10-07 07:28:55 -0700 (Sat, 07 Oct 2006)
>New Revision: 16337
>
>Log:
>wget: don't be careless with xstrdup'ing
>
>
>Modified:
>   trunk/busybox/networking/wget.c
>
>
>Changeset:
>Modified: trunk/busybox/networking/wget.c
>===================================================================
>--- trunk/busybox/networking/wget.c	2006-10-07 14:28:28 UTC (rev 16336)
>+++ trunk/busybox/networking/wget.c	2006-10-07 14:28:55 UTC (rev 16337)

>@@ -306,14 +310,14 @@
> 			if (fgets(buf, sizeof(buf), sfp) == NULL)
> 				bb_error_msg_and_die("no response from server");
> 
>-			for (s = buf ; *s != '\0' && !isspace(*s) ; ++s)
>-				;
>-			for ( ; isspace(*s) ; ++s)
>-				;
>+			s = buf;
>+			while (*s != '\0' && !isspace(*s)) ++s;
->+			while (isspace(*s)) ++s;
s = skip_whitespace(s) is perhaps smaller?




More information about the busybox mailing list