From: Baptiste Daroussin Date: Thu, 6 Jul 2023 13:38:42 +0000 (+0200) Subject: cleanup: remove some mygetline() occurence X-Git-Tag: RELEASE_1_4_0rc1~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8de53d81b77460e077d6183b6bb626e0a2272773;p=thirdparty%2Fmlmmj.git cleanup: remove some mygetline() occurence --- diff --git a/src/gethdrline.c b/src/gethdrline.c index 5690708e..09a8b7a9 100644 --- a/src/gethdrline.c +++ b/src/gethdrline.c @@ -26,7 +26,6 @@ #include #include "xmalloc.h" -#include "mygetline.h" #include "gethdrline.h" #include "strgen.h" #include "wrappers.h" diff --git a/src/mlmmj-maintd.c b/src/mlmmj-maintd.c index 30909304..7b132afd 100644 --- a/src/mlmmj-maintd.c +++ b/src/mlmmj-maintd.c @@ -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);