aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorvda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2007-03-24 12:08:36 +0000
committervda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2007-03-24 12:08:36 +0000
commit7c9d2e8b765aed4fe6a5aac5388f14f1133d6da2 (patch)
treef6bdc2dfc4328e621b14e344df3b3868f5d9cc58 /libbb
parentd6069fbbbbe01db072f83b5eb40212ca21d65fa9 (diff)
downloadbusybox-w32-7c9d2e8b765aed4fe6a5aac5388f14f1133d6da2.tar.gz
busybox-w32-7c9d2e8b765aed4fe6a5aac5388f14f1133d6da2.tar.bz2
busybox-w32-7c9d2e8b765aed4fe6a5aac5388f14f1133d6da2.zip
applets.c, xfunc.c: style cleanup
git-svn-id: svn://busybox.net/trunk/busybox@18217 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'libbb')
-rw-r--r--libbb/xfuncs.c16
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}