Re: [U-Boot] [PATCH v5 7/9] Remove interleave of non-U-Boot code in hush

2012-03-06 Thread Wolfgang Denk
Dear Simon Glass,

In message 1329285566-30386-8-git-send-email-...@chromium.org you wrote:
 There is a nasty interleave of #ifdefs in hush.c where the two code
 paths have different indents. Remove this ickiness.
 
 Signed-off-by: Simon Glass s...@chromium.org
 Acked-by: Mike Frysinger vap...@gentoo.org
 ---
 
  common/hush.c |   24 +++-
  1 files changed, 11 insertions(+), 13 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
The evolution of the human race will not be accomplished in  the  ten
thousand  years  of  tame  animals,  but in the million years of wild
animals, because man is and will always be a wild animal.
  - Charles Galton Darwin
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v5 7/9] Remove interleave of non-U-Boot code in hush

2012-02-14 Thread Simon Glass
There is a nasty interleave of #ifdefs in hush.c where the two code
paths have different indents. Remove this ickiness.

Signed-off-by: Simon Glass s...@chromium.org
Acked-by: Mike Frysinger vap...@gentoo.org
---

 common/hush.c |   24 +++-
 1 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/common/hush.c b/common/hush.c
index 6cb921d..3aa9d50 100644
--- a/common/hush.c
+++ b/common/hush.c
@@ -1642,6 +1642,15 @@ static int run_pipe_real(struct pipe *pi)
 * Is it really safe for inline use?  
Experimentally,
 * things seem to work with glibc. */
setup_redirects(child, squirrel);
+
+   child-argv += i;  /* XXX horrible hack */
+   rcode = x-function(child);
+   /* XXX restore hack so free() can work right */
+   child-argv -= i;
+   restore_redirects(squirrel);
+   }
+   return rcode;
+   }
 #else
/* check ;, because ,example , argv consist from
 * help;flinfo must not execute
@@ -1674,22 +1683,11 @@ static int run_pipe_real(struct pipe *pi)
if ((child-argc - i)  cmdtp-maxargs)
return cmd_usage(cmdtp);
 #endif
-   child-argv+=i;  /* XXX horrible hack */
-#ifndef __U_BOOT__
-   rcode = x-function(child);
-#else
/* OK - call function to do the command */
-   rcode = cmd_call(cmdtp, flag,  child-argc-i,
-child-argv[i]);
+   rcode = cmd_call(cmdtp, flag,  child-argc,
+child-argv);
if (!cmdtp-repeatable)
flag_repeat = 0;
-#endif
-   child-argv-=i;  /* XXX restore hack so free() 
can work right */
-#ifndef __U_BOOT__
-
-   restore_redirects(squirrel);
-#endif
-
return rcode;
}
}
-- 
1.7.7.3

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot