From 8f8e082ab478153da1dfabf3e27e07c3874709a7 Mon Sep 17 00:00:00 2001 From: bol-van Date: Sat, 2 Nov 2024 11:33:59 +0300 Subject: [PATCH] nfqws,tpws: disallow optimizer to inline config_from_file --- nfq/nfqws.c | 3 ++- tpws/tpws.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/nfq/nfqws.c b/nfq/nfqws.c index bec9b4e..32443e7 100644 --- a/nfq/nfqws.c +++ b/nfq/nfqws.c @@ -982,7 +982,8 @@ bool parse_tlspos(const char *s, enum tlspos *pos) return true; } -static void config_from_file(const char *filename) +// no static to not allow optimizer to inline this func (save stack) +void config_from_file(const char *filename) { // config from a file char buf[MAX_CONFIG_FILE_SIZE]; diff --git a/tpws/tpws.c b/tpws/tpws.c index 27d04c9..322e680 100644 --- a/tpws/tpws.c +++ b/tpws/tpws.c @@ -364,7 +364,8 @@ static bool parse_pf_list(char *opt, struct port_filters_head *pfl) return true; } -static void config_from_file(const char *filename) +// no static to not allow optimizer to inline this func (save stack) +void config_from_file(const char *filename) { // config from a file char buf[MAX_CONFIG_FILE_SIZE];