diff options
author | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-03 19:03:11 +0200 |
---|---|---|
committer | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-03 19:03:11 +0200 |
commit | 20b85c03e751b4876fa3c92040464e483172b746 (patch) | |
tree | 734fadbfdbc143ec4465093857f4c239448715e0 /src/qmail-clean.c | |
parent | a6a7d6ce079cabdaf2fa502b2e2cf15e5428ac6f (diff) |
manual format adjustment
Diffstat (limited to 'src/qmail-clean.c')
-rw-r--r-- | src/qmail-clean.c | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/src/qmail-clean.c b/src/qmail-clean.c index 2a9d706..efeda8c 100644 --- a/src/qmail-clean.c +++ b/src/qmail-clean.c @@ -70,9 +70,9 @@ int main() cleanuploop = 0; for (;;) { - if (cleanuploop) + if (cleanuploop) { --cleanuploop; - else { + } else { cleanuppid(); cleanuploop = 30; } @@ -98,28 +98,31 @@ int main() continue; } } - if (line.s[i] == '/') - if (!scan_ulong(line.s + i + 1, &id)) { - respond("x"); - continue; - } - if (byte_equal(line.s, 5, "foop/")) { -#define U(prefix, flag) \ - fmtqfn(fnbuf, prefix, id, flag); \ - if (unlink(fnbuf) == -1) \ - if (errno != ENOENT) { \ - respond("!"); \ - continue; \ + if (line.s[i] == '/' && !scan_ulong(line.s + i + 1, &id)) { + respond("x"); + continue; } - U("intd/", 1) - U("mess/", 1) +#define U(prefix, flag) \ + do { \ + fmtqfn(fnbuf, prefix, id, flag); \ + if (unlink(fnbuf) == -1) \ + if (errno != ENOENT) { \ + respond("!"); \ + continue; \ + } \ + } while (0) + + if (byte_equal(line.s, 5, "foop/")) { + U("intd/", 1); + U("mess/", 1); respond("+"); } else if (byte_equal(line.s, 4, "todo/")) { - U("intd/", 1) - U("todo/", 1) + U("intd/", 1); + U("todo/", 1); respond("+"); - } else + } else { respond("x"); + } } _exit(0); } |