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-rspawn.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'src/qmail-rspawn.c') diff --git a/src/qmail-rspawn.c b/src/qmail-rspawn.c index 939488d..4ef24e7 100644 --- a/src/qmail-rspawn.c +++ b/src/qmail-rspawn.c @@ -46,7 +46,7 @@ void report(buffer *log, int wstat, char *s, int len) result = -1; j = 0; - for (k = 0; k < len; ++k) + for (k = 0; k < len; ++k) { if (!s[k]) { if (s[j] == 'K') { result = 1; @@ -59,6 +59,7 @@ void report(buffer *log, int wstat, char *s, int len) if (s[j] == 'D') break; j = k + 1; } + } orr = result; @@ -73,18 +74,19 @@ void report(buffer *log, int wstat, char *s, int len) case -1: buffer_put(log, "D", 1); break; } - for (k = 1; k < len;) + for (k = 1; k < len;) { if (!s[k++]) { buffer_puts(log, s + 1); - if (result <= orr) - if (k < len) switch (s[k]) - { - case 'Z': - case 'D': - case 'K': buffer_puts(log, s + k + 1); - } + if (result <= orr && k < len) { + switch (s[k]) { + case 'Z': + case 'D': + case 'K': buffer_puts(log, s + k + 1); + } + } break; } + } } int spawn(int fdmess, int fdout, const char *s, char *r, const int at) -- cgit v1.2.3