From 973ae30e7c4f7a1afb385dd3d8eeea178f981445 Mon Sep 17 00:00:00 2001 From: Jannis Hoffmann Date: Mon, 8 Jul 2024 13:24:39 +0200 Subject: fix deprecated prototypes --- src/qmail-inject.c | 72 +++++++++++++++++++++++++++--------------------------- 1 file changed, 36 insertions(+), 36 deletions(-) (limited to 'src/qmail-inject.c') diff --git a/src/qmail-inject.c b/src/qmail-inject.c index 9b7cca7..bded8dc 100644 --- a/src/qmail-inject.c +++ b/src/qmail-inject.c @@ -59,7 +59,7 @@ int flagrh; int flagqueue; struct qmail qqt; -void out(char *s, int len) +static void out(char *s, int len) { if (flagqueue) qmail_put(&qqt, s, len); @@ -67,54 +67,54 @@ void out(char *s, int len) buffer_putflush(buffer_1, s, len); } -void outs(char *s) +static void outs(char *s) { out(s, str_len(s)); } -void perm() +static void perm() { _exit(100); } -void temp() +static void temp() { _exit(111); } -void die_nomem() +static void die_nomem() { buffer_putsflush(buffer_2, "qmail-inject: fatal: out of memory\n"); temp(); } -void die_invalid(stralloc *sa) +static void die_invalid(stralloc *sa) { buffer_putsflush(buffer_2, "qmail-inject: fatal: invalid header field: "); buffer_putflush(buffer_2, sa->s, sa->len); perm(); } -void die_qqt() +static void die_qqt() { buffer_putsflush(buffer_2, "qmail-inject: fatal: unable to run qmail-queue\n"); temp(); } -void die_chdir() +static void die_chdir() { buffer_putsflush(buffer_2, "qmail-inject: fatal: internal bug\n"); temp(); } -void die_read() +static void die_read() { if (errno == ENOMEM) die_nomem(); buffer_putsflush(buffer_2, "qmail-inject: fatal: read error\n"); temp(); } -void doordie(stralloc *sa, int r) +static void doordie(stralloc *sa, int r) { if (r == 1) return; if (r == -1) die_nomem(); @@ -135,7 +135,7 @@ saa hrrlist = {0}; saa reciplist = {0}; int flagresent; -void exitnicely() +static void exitnicely() { char *qqx; @@ -186,7 +186,7 @@ void exitnicely() _exit(0); } -void savedh_append(stralloc *h) +static void savedh_append(stralloc *h) { if (!saa_readyplus(&savedh, 1)) die_nomem(); savedh.sa[savedh.len] = sauninit; @@ -194,7 +194,7 @@ void savedh_append(stralloc *h) ++savedh.len; } -void savedh_print() +static void savedh_print() { int i; @@ -208,14 +208,14 @@ token822_alloc defaulthost = {0}; stralloc plusdomainbuf = {0}; token822_alloc plusdomain = {0}; -void rwroute(token822_alloc *addr) +static void rwroute(token822_alloc *addr) { if (addr->t[addr->len - 1].type == TOKEN822_AT) while (addr->len) if (addr->t[--addr->len].type == TOKEN822_COLON) return; } -void rwextraat(token822_alloc *addr) +static void rwextraat(token822_alloc *addr) { int i; @@ -225,7 +225,7 @@ void rwextraat(token822_alloc *addr) } } -void rwextradot(token822_alloc *addr) +static void rwextradot(token822_alloc *addr) { int i; @@ -235,7 +235,7 @@ void rwextradot(token822_alloc *addr) } } -void rwnoat(token822_alloc *addr) +static void rwnoat(token822_alloc *addr) { int i; int shift; @@ -251,7 +251,7 @@ void rwnoat(token822_alloc *addr) for (i = 0; i < shift; ++i) addr->t[i] = defaulthost.t[shift - 1 - i]; } -void rwnodot(token822_alloc *addr) +static void rwnodot(token822_alloc *addr) { int i; int shift; @@ -274,7 +274,7 @@ void rwnodot(token822_alloc *addr) for (i = 0; i < shift; ++i) addr->t[i] = defaultdomain.t[shift - 1 - i]; } -void rwplus(token822_alloc *addr) +static void rwplus(token822_alloc *addr) { int i; int shift; @@ -295,7 +295,7 @@ void rwplus(token822_alloc *addr) for (i = 0; i < shift; ++i) addr->t[i] = plusdomain.t[shift - 1 - i]; } -void rwgeneric(token822_alloc *addr) +static void rwgeneric(token822_alloc *addr) { if (!addr->len) return; /* don't rewrite <> */ if (addr->len >= 2) @@ -315,7 +315,7 @@ void rwgeneric(token822_alloc *addr) rwnodot(addr); } -int setreturn(token822_alloc *addr) +static int setreturn(token822_alloc *addr) { if (!sender.s) { token822_reverse(addr); @@ -327,20 +327,20 @@ int setreturn(token822_alloc *addr) return 1; } -int rwreturn(token822_alloc *addr) +static int rwreturn(token822_alloc *addr) { rwgeneric(addr); setreturn(addr); return 1; } -int rwsender(token822_alloc *addr) +static int rwsender(token822_alloc *addr) { rwgeneric(addr); return 1; } -void rwappend(token822_alloc *addr, saa *xl) +static void rwappend(token822_alloc *addr, saa *xl) { token822_reverse(addr); if (!saa_readyplus(xl, 1)) die_nomem(); @@ -350,21 +350,21 @@ void rwappend(token822_alloc *addr, saa *xl) token822_reverse(addr); } -int rwhrr(token822_alloc *addr) +static int rwhrr(token822_alloc *addr) { rwgeneric(addr); rwappend(addr, &hrrlist); return 1; } -int rwhr(token822_alloc *addr) +static int rwhr(token822_alloc *addr) { rwgeneric(addr); rwappend(addr, &hrlist); return 1; } -int rwtocc(token822_alloc *addr) +static int rwtocc(token822_alloc *addr) { rwgeneric(addr); rwappend(addr, &hrlist); @@ -378,7 +378,7 @@ token822_alloc hfin = {0}; token822_alloc hfrewrite = {0}; token822_alloc hfaddr = {0}; -void doheaderfield(stralloc *h) +static void doheaderfield(stralloc *h) { int htype; int (*rw)() = 0; @@ -428,7 +428,7 @@ void doheaderfield(stralloc *h) savedh_append(h); } -void dobody(stralloc *h) +static void dobody(stralloc *h) { out(h->s, h->len); } @@ -436,7 +436,7 @@ void dobody(stralloc *h) stralloc torecip = {0}; token822_alloc tr = {0}; -void dorecip(char *s) +static void dorecip(char *s) { if (!quote2(&torecip, s)) die_nomem(); @@ -456,7 +456,7 @@ void dorecip(char *s) stralloc defaultfrom = {0}; token822_alloc df = {0}; -void defaultfrommake() +static void defaultfrommake() { char *fullname; fullname = env_get("QMAILNAME"); @@ -518,7 +518,7 @@ token822_alloc drp = {0}; stralloc hackedruser = {0}; char strnum[FMT_ULONG]; -void dodefaultreturnpath() +static void dodefaultreturnpath() { if (!stralloc_copys(&hackedruser, mailruser)) die_nomem(); @@ -564,7 +564,7 @@ int flagmft = 0; stralloc mft = {0}; struct constmap mapmft; -void mft_init() +static void mft_init() { char *x; int r; @@ -580,7 +580,7 @@ void mft_init() flagmft = 1; } -void finishmft() +static void finishmft() { int i; static stralloc sa = {0}; @@ -606,7 +606,7 @@ void finishmft() outs("\n"); } -void finishheader() +static void finishheader() { flagresent = htypeseen[H_R_SENDER] || htypeseen[H_R_FROM] || htypeseen[H_R_REPLYTO] || htypeseen[H_R_TO] @@ -668,7 +668,7 @@ void finishheader() savedh_print(); } -void getcontrols() +static void getcontrols() { static stralloc sa = {0}; char *x; -- cgit v1.2.3