[git commit master] hush: small speed optimization. +10 bytes.

Denys Vlasenko vda.linux at googlemail.com
Wed Sep 23 23:44:13 UTC 2009


commit: http://git.busybox.net/busybox/commit/?id=718854025735db26a0dda9e6acfe785d2004b3bc
branch: http://git.busybox.net/busybox/commit/?id=refs/heads/master

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 shell/hush.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/shell/hush.c b/shell/hush.c
index 85a45dd..866593f 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -899,7 +899,7 @@ static int is_well_formed_var_name(const char *s, char terminator)
 /* Replace each \x with x in place, return ptr past NUL. */
 static char *unbackslash(char *src)
 {
-	char *dst = src;
+	char *dst = src = strchrnul(src, '\\');
 	while (1) {
 		if (*src == '\\')
 			src++;
-- 
1.6.3.3



More information about the busybox-cvs mailing list