diff options
author | Phil Pennock <phil+git@pennock-tech.com> | 2020-11-02 02:23:14 -0500 |
---|---|---|
committer | Heiko Schlittermann (HS12-RIPE) <hs@schlittermann.de> | 2021-04-28 00:40:27 +0200 |
commit | 6ca5fcba34070f4495a0188f16eb2e4d78f3430a (patch) | |
tree | 4f480844cd20c3b5be4486795b60443525b58b42 | |
parent | da683a61556bbbebdffcbebf2668da58da59f898 (diff) | |
download | exim4-6ca5fcba34070f4495a0188f16eb2e4d78f3430a.tar.gz |
Inline four often-called new functions
The BDAT state switchers should happen so often during SMTP reception that a
compiler hint to inline seems wise.
The length filter checks happen on every start-up, which for Exim is often
enough that I think an inline these is warranted too.
(cherry picked from commit 6e3d0e3f1c8228ef19a3d1ba61f131cef3172ceb)
-rw-r--r-- | src/src/exim.c | 4 | ||||
-rw-r--r-- | src/src/smtp_in.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/src/exim.c b/src/src/exim.c index e1736d6e9..3aa006d96 100644 --- a/src/src/exim.c +++ b/src/src/exim.c @@ -762,7 +762,7 @@ exit(EXIT_FAILURE); } /* fail if a length is too long */ -static void +static inline void exim_len_fail_toolong(int itemlen, int maxlen, const char *description) { if (itemlen <= maxlen) @@ -773,7 +773,7 @@ exit(EXIT_FAILURE); } /* only pass through the string item back to the caller if it's short enough */ -static const uschar * +static inline const uschar * exim_str_fail_toolong(const uschar *item, int maxlen, const char *description) { exim_len_fail_toolong(Ustrlen(item), maxlen, description); diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c index 04d6aa4ba..b48870d26 100644 --- a/src/src/smtp_in.c +++ b/src/src/smtp_in.c @@ -594,8 +594,8 @@ if (n > 0) /* Forward declarations */ -static void bdat_push_receive_functions(void); -static void bdat_pop_receive_functions(void); +static inline void bdat_push_receive_functions(void); +static inline void bdat_pop_receive_functions(void); /* Get a byte from the smtp input, in CHUNKING mode. Handle ack of the @@ -776,7 +776,7 @@ if (chunking_state != CHUNKING_LAST) } -static void +static inline void bdat_push_receive_functions(void) { /* push the current receive_* function on the "stack", and @@ -797,7 +797,7 @@ receive_getc = bdat_getc; receive_ungetc = bdat_ungetc; } -static void +static inline void bdat_pop_receive_functions(void) { receive_getc = lwr_receive_getc; |