From 20b85c03e751b4876fa3c92040464e483172b746 Mon Sep 17 00:00:00 2001 From: Jannis Hoffmann Date: Wed, 3 Jul 2024 19:03:11 +0200 Subject: manual format adjustment --- src/qmail-clean.c | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) (limited to 'src/qmail-clean.c') 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); } -- cgit v1.2.3