aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-09-24 01:44:13 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2009-09-24 01:44:13 +0200
commit718854025735db26a0dda9e6acfe785d2004b3bc (patch)
tree33367fd8e693f63b9c908e8ec598d04a1a96c3f9
parent2f7894b1bb60ab12b518fac5ea5928f3ec01de28 (diff)
downloadbusybox-718854025735db26a0dda9e6acfe785d2004b3bc.tar.gz
hush: small speed optimization. +10 bytes.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--shell/hush.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/shell/hush.c b/shell/hush.c
index 85a45dd6b..866593f77 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++;