radical re-formatting 2/3: Fix blocks

Fixes coding style. Formatting commits suck, incoherent coding style
sucks more.
https://suckless.org/coding_style/
This commit is contained in:
drkhsh
2022-10-28 00:51:34 +02:00
parent 2104dc362c
commit 3251e91187
14 changed files with 95 additions and 154 deletions

View File

@ -15,17 +15,17 @@ run_command(const char *cmd)
warn("popen '%s':", cmd);
return NULL;
}
p = fgets(buf, sizeof(buf) - 1, fp);
if (pclose(fp) < 0) {
warn("pclose '%s':", cmd);
return NULL;
}
if (!p) {
if (!p)
return NULL;
}
if ((p = strrchr(buf, '\n'))) {
if ((p = strrchr(buf, '\n')))
p[0] = '\0';
}
return buf[0] ? buf : NULL;
}