summaryrefslogtreecommitdiff
path: root/src/qmail-rspawn.c
diff options
context:
space:
mode:
authorJannis Hoffmann <jannis@fehcom.de>2024-07-03 19:03:11 +0200
committerJannis Hoffmann <jannis@fehcom.de>2024-07-03 19:03:11 +0200
commit20b85c03e751b4876fa3c92040464e483172b746 (patch)
tree734fadbfdbc143ec4465093857f4c239448715e0 /src/qmail-rspawn.c
parenta6a7d6ce079cabdaf2fa502b2e2cf15e5428ac6f (diff)
manual format adjustment
Diffstat (limited to 'src/qmail-rspawn.c')
-rw-r--r--src/qmail-rspawn.c20
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)