aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-03-20 11:30:28 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-03-20 11:30:28 +0000
commitc86e052b81210e762f8ca6b79cb46b8c4bdfbfe0 (patch)
tree90608280101218f60c7d9181b913e92ba895799d /shell
parente84aeb5bcb1a8398fce53aad9c0072ad73a8b5c9 (diff)
downloadbusybox-c86e052b81210e762f8ca6b79cb46b8c4bdfbfe0.tar.gz
fix accumulated whitespace and indentation damage
Diffstat (limited to 'shell')
-rw-r--r--shell/ash_test/ash-arith/arith-for.right4
-rwxr-xr-xshell/ash_test/ash-arith/arith-for.testsx2
-rwxr-xr-xshell/ash_test/ash-arith/arith.tests4
-rwxr-xr-xshell/ash_test/ash-heredoc/heredoc.tests2
-rwxr-xr-xshell/ash_test/run-all2
-rw-r--r--shell/msh.c46
6 files changed, 30 insertions, 30 deletions
diff --git a/shell/ash_test/ash-arith/arith-for.right b/shell/ash_test/ash-arith/arith-for.right
index 44941103f..88dbc15fa 100644
--- a/shell/ash_test/ash-arith/arith-for.right
+++ b/shell/ash_test/ash-arith/arith-for.right
@@ -11,8 +11,8 @@
2
4
fx is a function
-fx ()
-{
+fx ()
+{
i=0;
for ((1; i < 3; i++ ))
do
diff --git a/shell/ash_test/ash-arith/arith-for.testsx b/shell/ash_test/ash-arith/arith-for.testsx
index 585aa5133..4fa30ff90 100755
--- a/shell/ash_test/ash-arith/arith-for.testsx
+++ b/shell/ash_test/ash-arith/arith-for.testsx
@@ -73,7 +73,7 @@ done
type fx
fx
-# errors
+# errors
for (( i=0; "i < 3" ))
do
echo $i
diff --git a/shell/ash_test/ash-arith/arith.tests b/shell/ash_test/ash-arith/arith.tests
index 272fc3487..d65758e7d 100755
--- a/shell/ash_test/ash-arith/arith.tests
+++ b/shell/ash_test/ash-arith/arith.tests
@@ -144,12 +144,12 @@ echo 40 $(( 8 ^ 32 ))
#ash# echo 10 $(( 32#a ))
#ash# echo 10 $(( 56#a ))
#ash# echo 10 $(( 64#a ))
-#ash#
+#ash#
#ash# echo 10 $(( 16#A ))
#ash# echo 10 $(( 32#A ))
#ash# echo 36 $(( 56#A ))
#ash# echo 36 $(( 64#A ))
-#ash#
+#ash#
#ash# echo 62 $(( 64#@ ))
#ash# echo 63 $(( 64#_ ))
diff --git a/shell/ash_test/ash-heredoc/heredoc.tests b/shell/ash_test/ash-heredoc/heredoc.tests
index 31316a58d..b3cdc3f7b 100755
--- a/shell/ash_test/ash-heredoc/heredoc.tests
+++ b/shell/ash_test/ash-heredoc/heredoc.tests
@@ -1,6 +1,6 @@
# check order and content of multiple here docs
-cat << EOF1 << EOF2
+cat << EOF1 << EOF2
hi
EOF1
there
diff --git a/shell/ash_test/run-all b/shell/ash_test/run-all
index ba1756e7d..02f6d2a9d 100755
--- a/shell/ash_test/run-all
+++ b/shell/ash_test/run-all
@@ -18,7 +18,7 @@ do_test()
cd "$1" || { echo "cannot cd $1!"; exit 1; }
for x in run-*; do
test -f "$x" || continue
- case "$x" in
+ case "$x" in
"$0"|run-minimal|run-gprof) ;;
*.orig|*~) ;;
#*) echo $x ; sh $x ;;
diff --git a/shell/msh.c b/shell/msh.c
index 89c375380..41f4cc60d 100644
--- a/shell/msh.c
+++ b/shell/msh.c
@@ -50,36 +50,36 @@ static char *find_applet_by_name(const char *applet)
}
static void utoa_to_buf(unsigned n, char *buf, unsigned buflen)
{
- unsigned i, out, res;
- assert(sizeof(unsigned) == 4);
- if (buflen) {
- out = 0;
- for (i = 1000000000; i; i /= 10) {
- res = n / i;
- if (res || out || i == 1) {
- if (!--buflen) break;
- out++;
- n -= res*i;
- *buf++ = '0' + res;
- }
- }
- *buf = '\0';
- }
+ unsigned i, out, res;
+ assert(sizeof(unsigned) == 4);
+ if (buflen) {
+ out = 0;
+ for (i = 1000000000; i; i /= 10) {
+ res = n / i;
+ if (res || out || i == 1) {
+ if (!--buflen) break;
+ out++;
+ n -= res*i;
+ *buf++ = '0' + res;
+ }
+ }
+ *buf = '\0';
+ }
}
static void itoa_to_buf(int n, char *buf, unsigned buflen)
{
- if (buflen && n<0) {
- n = -n;
- *buf++ = '-';
- buflen--;
- }
- utoa_to_buf((unsigned)n, buf, buflen);
+ if (buflen && n < 0) {
+ n = -n;
+ *buf++ = '-';
+ buflen--;
+ }
+ utoa_to_buf((unsigned)n, buf, buflen);
}
static char local_buf[12];
static char *itoa(int n)
{
- itoa_to_buf(n, local_buf, sizeof(local_buf));
- return local_buf;
+ itoa_to_buf(n, local_buf, sizeof(local_buf));
+ return local_buf;
}
#else
# include <setjmp.h>