summaryrefslogtreecommitdiff
path: root/src/setmaillist.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/setmaillist.c
parenta6a7d6ce079cabdaf2fa502b2e2cf15e5428ac6f (diff)
manual format adjustment
Diffstat (limited to 'src/setmaillist.c')
-rw-r--r--src/setmaillist.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/setmaillist.c b/src/setmaillist.c
index a32e86b..e06e336 100644
--- a/src/setmaillist.c
+++ b/src/setmaillist.c
@@ -1,6 +1,8 @@
#include <sys/stat.h>
#include <unistd.h>
+#include <stdio.h> // rename
+
#include "buffer.h"
#include "byte.h"
#include "getln.h"
@@ -10,8 +12,6 @@
#define WHO "setmaillist"
-int rename(const char *, const char *); // stdio.h
-
void usage()
{
logmsg(WHO, 100, USAGE, "setmaillist list.bin list.tmp");
@@ -50,7 +50,6 @@ int main(int argc, char **argv)
buffer_init(&bo, write, fd, buf, sizeof(buf));
-
do {
if (getln(buffer_0small, &line, &match, '\n') == -1)
logmsg(WHO, 111, FATAL, "unable to read input: ");
@@ -64,7 +63,7 @@ int main(int argc, char **argv)
if (byte_chr(line.s, line.len, '\0') != line.len) logmsg(WHO, 111, FATAL, "NUL in input");
- if (line.len)
+ if (line.len) {
if (line.s[0] != '#') {
if ((line.s[0] == '.') || (line.s[0] == '/')) {
out(line.s, line.len);
@@ -76,6 +75,7 @@ int main(int argc, char **argv)
out("", 1);
}
}
+ }
} while (match);