X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/bb07bcd32250965a896b0856dd1b839b5795e2f4..e30f4f43de211b14bd405a3d0e1579b9bd814908:/src/src/sieve.c diff --git a/src/src/sieve.c b/src/src/sieve.c index 29a1136ac..f5329da0c 100644 --- a/src/src/sieve.c +++ b/src/src/sieve.c @@ -3,7 +3,7 @@ *************************************************/ /* Copyright (c) Michael Haardt 2003 - 2015 - * Copyright (c) The Exim Maintainers 2016 + * Copyright (c) The Exim Maintainers 2016 - 2018 * See the file NOTICE for conditions of use and distribution. */ @@ -21,7 +21,7 @@ #include "exim.h" #if HAVE_ICONV -#include +# include #endif /* Define this for RFC compliant \r\n end-of-line terminators. */ @@ -153,8 +153,10 @@ static uschar str_cc_c[]="Cc"; static const struct String str_cc={ str_cc_c, 2 }; static uschar str_bcc_c[]="Bcc"; static const struct String str_bcc={ str_bcc_c, 3 }; +#ifdef ENVELOPE_AUTH static uschar str_auth_c[]="auth"; static const struct String str_auth={ str_auth_c, 4 }; +#endif static uschar str_sender_c[]="Sender"; static const struct String str_sender={ str_sender_c, 6 }; static uschar str_resent_from_c[]="Resent-From"; @@ -1472,10 +1474,10 @@ Returns: 1 success 0 identifier not matched */ -static int parse_string(struct Sieve *filter, struct String *data) +static int +parse_string(struct Sieve *filter, struct String *data) { gstring * g = NULL; -int dataCapacity=0; data->length = 0; data->character = NULL; @@ -1737,7 +1739,6 @@ if (*filter->pc=='[') /* string list */ if (dataLength+1 >= dataCapacity) /* increase buffer */ { struct String *new; - int newCapacity; /* Don't amalgamate with next line; some compilers grumble */ dataCapacity = dataCapacity ? dataCapacity * 2 : 4; new = store_get(sizeof(struct String) * dataCapacity); @@ -2136,7 +2137,7 @@ if (parse_identifier(filter,CUS "address")) filter->errmsg=CUS "header string expansion failed"; return -1; } - parse_allow_group = TRUE; + f.parse_allow_group = TRUE; while (*header_value && !*cond) { uschar *error; @@ -2182,8 +2183,8 @@ if (parse_identifier(filter,CUS "address")) if (saveend == 0) break; header_value = end_addr + 1; } - parse_allow_group = FALSE; - parse_found_group = FALSE; + f.parse_allow_group = FALSE; + f.parse_found_group = FALSE; } } return 1; @@ -3286,7 +3287,6 @@ while (*filter->pc) if (exec) { address_item *addr; - int start; uschar *buffer; int buffer_capacity; md5 base; @@ -3384,8 +3384,8 @@ while (*filter->pc) for ( - mime_body=reason.character,reason_end=reason.character+reason.length; - mime_body<(reason_end-(sizeof(nlnl)-1)) && memcmp(mime_body,nlnl,(sizeof(nlnl)-1)); + mime_body = reason.character, reason_end = reason.character + reason.length; + mime_body < (reason_end-(sizeof(nlnl)-1)) && memcmp(mime_body, nlnl, (sizeof(nlnl)-1)); ++mime_body ); @@ -3399,7 +3399,6 @@ while (*filter->pc) { struct String qp = { .character = NULL, .length = 0 }; /* Keep compiler happy (PH) */ - start = reason.length; addr->reply->headers = US"MIME-Version: 1.0\n" "Content-Type: text/plain;\n" "\tcharset=\"utf-8\"\n"