diff options
author | Denis Vlasenko | 2007-03-24 12:08:36 +0000 |
---|---|---|
committer | Denis Vlasenko | 2007-03-24 12:08:36 +0000 |
commit | 1b6fa4c57ced2ae89f51bdc073410c4be5384007 (patch) | |
tree | f6bdc2dfc4328e621b14e344df3b3868f5d9cc58 /libbb/xfuncs.c | |
parent | ce074df814d97841c8239e335c6f4560f8942025 (diff) | |
download | busybox-1b6fa4c57ced2ae89f51bdc073410c4be5384007.zip busybox-1b6fa4c57ced2ae89f51bdc073410c4be5384007.tar.gz |
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 2cc6a82..c496f9a 100644 --- a/libbb/xfuncs.c +++ b/libbb/xfuncs.c @@ -251,15 +251,15 @@ void smart_ulltoa5(unsigned long long ul, char buf[5]) fmt = " 123456789"; if (!idx) { // 9999 or less: use 1234 format c = buf[0] = " 123456789"[v/10000]; - if (c!=' ') fmt = "0123456789"; + if (c != ' ') fmt = "0123456789"; c = buf[1] = fmt[v/1000%10]; - if (c!=' ') fmt = "0123456789"; + if (c != ' ') fmt = "0123456789"; buf[2] = fmt[v/100%10]; buf[3] = "0123456789"[v/10%10]; } else { - if (v>=10*10) { // scaled value is >=10: use 123M format + if (v >= 10*10) { // scaled value is >=10: use 123M format c = buf[0] = " 123456789"[v/1000]; - if (c!=' ') fmt = "0123456789"; + if (c != ' ') fmt = "0123456789"; buf[1] = fmt[v/100%10]; buf[2] = "0123456789"[v/10%10]; } else { // scaled value is <10: use 1.2M format @@ -483,10 +483,9 @@ DIR *warn_opendir(const char *path) { DIR *dp; - if ((dp = opendir(path)) == NULL) { + dp = opendir(path); + if (!dp) bb_perror_msg("cannot open '%s'", path); - return NULL; - } return dp; } @@ -495,7 +494,8 @@ DIR *xopendir(const char *path) { DIR *dp; - if ((dp = opendir(path)) == NULL) + dp = opendir(path); + if (!dp) bb_perror_msg_and_die("cannot open '%s'", path); return dp; } |