diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-03-20 11:30:28 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-03-20 11:30:28 +0000 |
commit | c86e052b81210e762f8ca6b79cb46b8c4bdfbfe0 (patch) | |
tree | 90608280101218f60c7d9181b913e92ba895799d /shell/msh.c | |
parent | e84aeb5bcb1a8398fce53aad9c0072ad73a8b5c9 (diff) | |
download | busybox-w32-c86e052b81210e762f8ca6b79cb46b8c4bdfbfe0.tar.gz busybox-w32-c86e052b81210e762f8ca6b79cb46b8c4bdfbfe0.tar.bz2 busybox-w32-c86e052b81210e762f8ca6b79cb46b8c4bdfbfe0.zip |
fix accumulated whitespace and indentation damage
Diffstat (limited to 'shell/msh.c')
-rw-r--r-- | shell/msh.c | 46 |
1 files changed, 23 insertions, 23 deletions
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) | |||
50 | } | 50 | } |
51 | static void utoa_to_buf(unsigned n, char *buf, unsigned buflen) | 51 | static void utoa_to_buf(unsigned n, char *buf, unsigned buflen) |
52 | { | 52 | { |
53 | unsigned i, out, res; | 53 | unsigned i, out, res; |
54 | assert(sizeof(unsigned) == 4); | 54 | assert(sizeof(unsigned) == 4); |
55 | if (buflen) { | 55 | if (buflen) { |
56 | out = 0; | 56 | out = 0; |
57 | for (i = 1000000000; i; i /= 10) { | 57 | for (i = 1000000000; i; i /= 10) { |
58 | res = n / i; | 58 | res = n / i; |
59 | if (res || out || i == 1) { | 59 | if (res || out || i == 1) { |
60 | if (!--buflen) break; | 60 | if (!--buflen) break; |
61 | out++; | 61 | out++; |
62 | n -= res*i; | 62 | n -= res*i; |
63 | *buf++ = '0' + res; | 63 | *buf++ = '0' + res; |
64 | } | 64 | } |
65 | } | 65 | } |
66 | *buf = '\0'; | 66 | *buf = '\0'; |
67 | } | 67 | } |
68 | } | 68 | } |
69 | static void itoa_to_buf(int n, char *buf, unsigned buflen) | 69 | static void itoa_to_buf(int n, char *buf, unsigned buflen) |
70 | { | 70 | { |
71 | if (buflen && n<0) { | 71 | if (buflen && n < 0) { |
72 | n = -n; | 72 | n = -n; |
73 | *buf++ = '-'; | 73 | *buf++ = '-'; |
74 | buflen--; | 74 | buflen--; |
75 | } | 75 | } |
76 | utoa_to_buf((unsigned)n, buf, buflen); | 76 | utoa_to_buf((unsigned)n, buf, buflen); |
77 | } | 77 | } |
78 | static char local_buf[12]; | 78 | static char local_buf[12]; |
79 | static char *itoa(int n) | 79 | static char *itoa(int n) |
80 | { | 80 | { |
81 | itoa_to_buf(n, local_buf, sizeof(local_buf)); | 81 | itoa_to_buf(n, local_buf, sizeof(local_buf)); |
82 | return local_buf; | 82 | return local_buf; |
83 | } | 83 | } |
84 | #else | 84 | #else |
85 | # include <setjmp.h> | 85 | # include <setjmp.h> |