diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2022-03-13 16:23:31 +0000 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2022-03-16 13:34:54 +0000 |
commit | 06f765450c70d1abcf13fbfbbd17cfc00e0ba02a (patch) | |
tree | 58c0c837cc4da6375034bca481dd047843641004 /src | |
parent | c301e84afb0714d84662db1e7b2bf5eeb45da324 (diff) |
constify
Diffstat (limited to 'src')
-rw-r--r-- | src/src/expand.c | 18 | ||||
-rw-r--r-- | src/src/functions.h | 2 | ||||
-rw-r--r-- | src/src/transport.c | 2 |
3 files changed, 11 insertions, 11 deletions
diff --git a/src/src/expand.c b/src/src/expand.c index 95bf4ad07..2d55a8846 100644 --- a/src/src/expand.c +++ b/src/src/expand.c @@ -5526,10 +5526,7 @@ while (*s) case EITEM_RUN: { FILE * f; - uschar * arg; - const uschar ** argv; - pid_t pid; - int fd_in, fd_out; + const uschar * arg, ** argv; if ((expand_forbid & RDO_RUN) != 0) { @@ -5538,16 +5535,17 @@ while (*s) } Uskip_whitespace(&s); - if (*s != '{') + if (*s != '{') /*}*/ { expand_string_message = US"missing '{' for command arg of run"; - goto EXPAND_FAILED_CURLY; + goto EXPAND_FAILED_CURLY; /*"}*/ } if (!(arg = expand_string_internal(s+1, TRUE, &s, skipping, TRUE, &resetok))) goto EXPAND_FAILED; Uskip_whitespace(&s); + /*{*/ if (*s++ != '}') - { + { /*{*/ expand_string_message = US"missing '}' closing command arg of run"; goto EXPAND_FAILED_CURLY; } @@ -5559,6 +5557,9 @@ while (*s) } else { + int fd_in, fd_out; + pid_t pid; + if (!transport_set_up_command(&argv, /* anchor for arg list */ arg, /* raw command */ FALSE, /* don't expand the arguments */ @@ -5576,7 +5577,7 @@ while (*s) expand_string_message = string_sprintf("couldn't create child process: %s", strerror(errno)); goto EXPAND_FAILED; - } + } /* Nothing is written to the standard input. */ @@ -6417,7 +6418,6 @@ while (*s) goto EXPAND_FAILED; /*{{*/ if (*s++ != '}') { - /*{*/ expand_string_message = string_sprintf("missing '}' closing first arg of %s", name); goto EXPAND_FAILED_CURLY; diff --git a/src/src/functions.h b/src/src/functions.h index d05d87450..f52c155b0 100644 --- a/src/src/functions.h +++ b/src/src/functions.h @@ -615,7 +615,7 @@ extern BOOL transport_pass_socket(const uschar *, const uschar *, const uscha #endif ); extern uschar *transport_rcpt_address(address_item *, BOOL); -extern BOOL transport_set_up_command(const uschar ***, uschar *, +extern BOOL transport_set_up_command(const uschar ***, const uschar *, BOOL, int, address_item *, const uschar *, uschar **); extern void transport_update_waiting(host_item *, uschar *); extern BOOL transport_write_block(transport_ctx *, uschar *, int, BOOL); diff --git a/src/src/transport.c b/src/src/transport.c index aaef2f6d7..fbd0bb39b 100644 --- a/src/src/transport.c +++ b/src/src/transport.c @@ -2075,7 +2075,7 @@ Returns: TRUE if all went well; otherwise an error will be */ BOOL -transport_set_up_command(const uschar ***argvptr, uschar *cmd, +transport_set_up_command(const uschar *** argvptr, const uschar * cmd, BOOL expand_arguments, int expand_failed, address_item *addr, const uschar * etext, uschar ** errptr) { |