From 87664716d2c1c43e4386099e3ce3f4b11d56e76e Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Mon, 2 Feb 2026 18:24:26 +0000 Subject: Make it build. (No, it won't work.) --- src/qmail-smtpc/smtproutes.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/qmail-smtpc/smtproutes.c') diff --git a/src/qmail-smtpc/smtproutes.c b/src/qmail-smtpc/smtproutes.c index bcea080..d5b1fac 100644 --- a/src/qmail-smtpc/smtproutes.c +++ b/src/qmail-smtpc/smtproutes.c @@ -21,6 +21,7 @@ #include #include "qmailr.h" +#include "qmail-smtpc.h" /* @@ -88,7 +89,7 @@ END=a, X=b static inline uint8_t cclass (char c) { static uint8_t const table[128] = "0999999999299999999999999999999998918889999898786666666666399898877777788888888888888888884958898888888888888888888888888899999" ; - return c & 0x80 ? 9 : table[c] - '0' ; + return c & 0x80 ? 9 : table[(uint8_t)c] - '0' ; } static inline char getnext (buffer *b) @@ -101,7 +102,7 @@ static inline char getnext (buffer *b) static inline void smtproutes_compile (int fdr, int fdw) { - static uint16_t const table[10][9] = + static uint16_t const table[10][10] = { { 0x000a, 0x0001, 0x0000, 0x0205, 0x0002, 0x000b, 0x0103, 0x0103, 0x0103, 0x000b }, { 0x000a, 0x0001, 0x0000, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001 }, @@ -232,3 +233,8 @@ int smtproutes_match (smtproutes const *routes, char const *s, stralloc *sa, siz if (!stralloc_catb(sa, data.s + 2, data.len - 2)) qmailr_tempsys("Unable to grow stralloc") ; return 1 ; } + +void smtproutes_free (smtproutes *routes) +{ + cdb_free(&routes->map) ; +} -- cgit v1.3.1