summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authordrkhsh <me@drkhsh.at>2022-10-28 00:51:34 +0200
committerdrkhsh <me@drkhsh.at>2022-10-28 01:03:38 +0200
commit3251e911878b78b0aad8fc09c782f8d81c878f75 (patch)
treedc9b6927e963a994286babd803357615c9b37a22 /util.c
parent2104dc362ca7336d98499a5945ea2a3d371f7568 (diff)
downloadslstatus-3251e911878b78b0aad8fc09c782f8d81c878f75.tar.gz
radical re-formatting 2/3: Fix blocks
Fixes coding style. Formatting commits suck, incoherent coding style sucks more. https://suckless.org/coding_style/
Diffstat (limited to 'util.c')
-rw-r--r--util.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/util.c b/util.c
index 85366bf..d1f6077 100644
--- a/util.c
+++ b/util.c
@@ -13,9 +13,8 @@ char *argv0;
static void
verr(const char *fmt, va_list ap)
{
- if (argv0 && strncmp(fmt, "usage", sizeof("usage") - 1)) {
+ if (argv0 && strncmp(fmt, "usage", sizeof("usage") - 1))
fprintf(stderr, "%s: ", argv0);
- }
vfprintf(stderr, fmt, ap);
@@ -119,9 +118,8 @@ fmt_human(uintmax_t num, int base)
}
scaled = num;
- for (i = 0; i < prefixlen && scaled >= base; i++) {
+ for (i = 0; i < prefixlen && scaled >= base; i++)
scaled /= base;
- }
return bprintf("%.1f %s", scaled, prefix[i]);
}