summaryrefslogtreecommitdiff
path: root/src/qmail-tcpok.c
diff options
context:
space:
mode:
authorJannis Hoffmann <jannis@fehcom.de>2024-07-03 15:52:39 +0200
committerJannis Hoffmann <jannis@fehcom.de>2024-07-03 15:52:39 +0200
commita6a7d6ce079cabdaf2fa502b2e2cf15e5428ac6f (patch)
treeb88cc7a8457658d67e0321718556ac807f6bccf3 /src/qmail-tcpok.c
parent00be7622c428f279872f84569f098ce16150f8a8 (diff)
format files
Diffstat (limited to 'src/qmail-tcpok.c')
-rw-r--r--src/qmail-tcpok.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/src/qmail-tcpok.c b/src/qmail-tcpok.c
index 2935f17..db37274 100644
--- a/src/qmail-tcpok.c
+++ b/src/qmail-tcpok.c
@@ -1,10 +1,12 @@
-#include "logmsg.h"
+#include <unistd.h>
+
#include "buffer.h"
+#include "exit.h"
#include "lock.h"
+#include "logmsg.h"
#include "open.h"
-#include <unistd.h>
+
#include "auto_qmail.h"
-#include "exit.h"
#define WHO "qmail-tcpok"
@@ -16,21 +18,18 @@ int main()
int fd;
int i;
- if (chdir(auto_qmail) == -1)
- logmsg(WHO,111,FATAL,B("unable to chdir to: ",auto_qmail));
+ if (chdir(auto_qmail) == -1) logmsg(WHO, 111, FATAL, B("unable to chdir to: ", auto_qmail));
if (chdir("queue/lock") == -1)
- logmsg(WHO,111,FATAL,B("unable to chdir to ",auto_qmail,"/queue/lock: "));
+ logmsg(WHO, 111, FATAL, B("unable to chdir to ", auto_qmail, "/queue/lock: "));
fd = open_write("tcpto");
- if (fd == -1)
- logmsg(WHO,111,FATAL,B("unable to write ",auto_qmail,"/queue/lock/tcpto: "));
+ if (fd == -1) logmsg(WHO, 111, FATAL, B("unable to write ", auto_qmail, "/queue/lock/tcpto: "));
if (lock_ex(fd) == -1)
- logmsg(WHO,111,FATAL,B("unable to lock ",auto_qmail,"/queue/lock/tcpto: "));
+ logmsg(WHO, 111, FATAL, B("unable to lock ", auto_qmail, "/queue/lock/tcpto: "));
- buffer_init(&bo,write,fd,buf,sizeof(buf));
- for (i = 0; i < sizeof(buf); ++i)
- buffer_put(&bo,"",1);
+ buffer_init(&bo, write, fd, buf, sizeof(buf));
+ for (i = 0; i < sizeof(buf); ++i) buffer_put(&bo, "", 1);
if (buffer_flush(&bo) == -1)
- logmsg(WHO,111,FATAL,B("unable to clear ",auto_qmail,"/queue/lock/tcpto: "));
+ logmsg(WHO, 111, FATAL, B("unable to clear ", auto_qmail, "/queue/lock/tcpto: "));
_exit(0);
}