diff options
Diffstat (limited to 'src/qmail-rspawn.c')
-rw-r--r-- | src/qmail-rspawn.c | 20 |
1 files changed, 11 insertions, 9 deletions
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) |