]> git.ipfire.org Git - thirdparty/mlmmj.git/commitdiff
cleanup: remove some mygetline() occurence
authorBaptiste Daroussin <bapt@FreeBSD.org>
Thu, 6 Jul 2023 13:38:42 +0000 (15:38 +0200)
committerBaptiste Daroussin <bapt@FreeBSD.org>
Thu, 6 Jul 2023 13:38:42 +0000 (15:38 +0200)
src/gethdrline.c
src/mlmmj-maintd.c

index 5690708ecfbe9312049458b54cef0905ef61cc8b..09a8b7a9228a0e2e4582b2f5fa05fc11c4723349 100644 (file)
@@ -26,7 +26,6 @@
 #include <unistd.h>
 
 #include "xmalloc.h"
-#include "mygetline.h"
 #include "gethdrline.h"
 #include "strgen.h"
 #include "wrappers.h"
index 3090930475274c41f97bd4c5c504f12f8eb684e8..7b132afdca8aa289f0e2ec17dd1e9c51b3c6f3a9 100644 (file)
@@ -503,8 +503,7 @@ unsub_bouncers(int dfd, int ctrlfd, int logfd)
                        ret = false;
                        continue;
                }
-               firstbounce = mygetline(fd);
-               close(fd);
+               firstbounce = readlf(fd, true);
                if(firstbounce == NULL)
                        continue;
 
@@ -591,8 +590,7 @@ run_digests(struct ml *ml, const char *mlmmjsend, int logfd)
                close(fd);
                return (false);
        }
-       s2 = mygetline(indexfd);
-       close(indexfd);
+       s2 = readlf(indexfd, true);
        if (!s2) {
                /* If we don't have an index, no mails have been sent to the
                 * list, and therefore we don't need to send a digest */
@@ -600,7 +598,6 @@ run_digests(struct ml *ml, const char *mlmmjsend, int logfd)
                close(fd);
                return (true);
        }
-       chomp(s2);
        index = strtoim(s2, 0, LONG_MAX, &errstr);
        if (errstr != NULL) {
                log(" - Invalid index content '%s': %s\n", s2, errstr);