diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-03-24 12:08:36 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-03-24 12:08:36 +0000 |
commit | 1b6fa4c57ced2ae89f51bdc073410c4be5384007 (patch) | |
tree | f6bdc2dfc4328e621b14e344df3b3868f5d9cc58 /libbb/xfuncs.c | |
parent | ce074df814d97841c8239e335c6f4560f8942025 (diff) | |
download | busybox-w32-1b6fa4c57ced2ae89f51bdc073410c4be5384007.tar.gz busybox-w32-1b6fa4c57ced2ae89f51bdc073410c4be5384007.tar.bz2 busybox-w32-1b6fa4c57ced2ae89f51bdc073410c4be5384007.zip |
applets.c, xfunc.c: style cleanup
Diffstat (limited to 'libbb/xfuncs.c')
-rw-r--r-- | libbb/xfuncs.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c index 2cc6a8299..c496f9a22 100644 --- a/libbb/xfuncs.c +++ b/libbb/xfuncs.c | |||
@@ -251,15 +251,15 @@ void smart_ulltoa5(unsigned long long ul, char buf[5]) | |||
251 | fmt = " 123456789"; | 251 | fmt = " 123456789"; |
252 | if (!idx) { // 9999 or less: use 1234 format | 252 | if (!idx) { // 9999 or less: use 1234 format |
253 | c = buf[0] = " 123456789"[v/10000]; | 253 | c = buf[0] = " 123456789"[v/10000]; |
254 | if (c!=' ') fmt = "0123456789"; | 254 | if (c != ' ') fmt = "0123456789"; |
255 | c = buf[1] = fmt[v/1000%10]; | 255 | c = buf[1] = fmt[v/1000%10]; |
256 | if (c!=' ') fmt = "0123456789"; | 256 | if (c != ' ') fmt = "0123456789"; |
257 | buf[2] = fmt[v/100%10]; | 257 | buf[2] = fmt[v/100%10]; |
258 | buf[3] = "0123456789"[v/10%10]; | 258 | buf[3] = "0123456789"[v/10%10]; |
259 | } else { | 259 | } else { |
260 | if (v>=10*10) { // scaled value is >=10: use 123M format | 260 | if (v >= 10*10) { // scaled value is >=10: use 123M format |
261 | c = buf[0] = " 123456789"[v/1000]; | 261 | c = buf[0] = " 123456789"[v/1000]; |
262 | if (c!=' ') fmt = "0123456789"; | 262 | if (c != ' ') fmt = "0123456789"; |
263 | buf[1] = fmt[v/100%10]; | 263 | buf[1] = fmt[v/100%10]; |
264 | buf[2] = "0123456789"[v/10%10]; | 264 | buf[2] = "0123456789"[v/10%10]; |
265 | } else { // scaled value is <10: use 1.2M format | 265 | } else { // scaled value is <10: use 1.2M format |
@@ -483,10 +483,9 @@ DIR *warn_opendir(const char *path) | |||
483 | { | 483 | { |
484 | DIR *dp; | 484 | DIR *dp; |
485 | 485 | ||
486 | if ((dp = opendir(path)) == NULL) { | 486 | dp = opendir(path); |
487 | if (!dp) | ||
487 | bb_perror_msg("cannot open '%s'", path); | 488 | bb_perror_msg("cannot open '%s'", path); |
488 | return NULL; | ||
489 | } | ||
490 | return dp; | 489 | return dp; |
491 | } | 490 | } |
492 | 491 | ||
@@ -495,7 +494,8 @@ DIR *xopendir(const char *path) | |||
495 | { | 494 | { |
496 | DIR *dp; | 495 | DIR *dp; |
497 | 496 | ||
498 | if ((dp = opendir(path)) == NULL) | 497 | dp = opendir(path); |
498 | if (!dp) | ||
499 | bb_perror_msg_and_die("cannot open '%s'", path); | 499 | bb_perror_msg_and_die("cannot open '%s'", path); |
500 | return dp; | 500 | return dp; |
501 | } | 501 | } |