summaryrefslogtreecommitdiff
path: root/src/setmaillist.c
diff options
context:
space:
mode:
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);