X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/32393657bff79d9925ec865aebb066c9409c4e27..64cc4714abd0d616327bfacdfc1b0fb45bff096e:/src/src/rda.c?ds=sidebyside diff --git a/src/src/rda.c b/src/src/rda.c index 498a06168..5615b64d5 100644 --- a/src/src/rda.c +++ b/src/src/rda.c @@ -42,7 +42,7 @@ Returns: FILTER_EXIM if it starts with "# Exim filter" static BOOL match_tag(const uschar *s, const uschar *tag) { -for (; *tag != 0; s++, tag++) +for (; *tag; s++, tag++) if (*tag == ' ') { while (*s == ' ' || *s == '\t') s++; @@ -60,10 +60,10 @@ tags for other types of filter. */ int rda_is_filter(const uschar *s) { -while (isspace(*s)) s++; /* Skips initial blank lines */ -if (match_tag(s, CUS"# exim filter")) return FILTER_EXIM; - else if (match_tag(s, CUS"# sieve filter")) return FILTER_SIEVE; - else return FILTER_FORWARD; +Uskip_whitespace(&s); /* Skips initial blank lines */ +if (match_tag(s, CUS"# exim filter")) return FILTER_EXIM; +else if (match_tag(s, CUS"# sieve filter")) return FILTER_SIEVE; +else return FILTER_FORWARD; } @@ -222,7 +222,7 @@ if (!(fwd = Ufopen(filename, "rb"))) switch(errno) DEFAULT_ERROR: default: - *error = string_open_failed(errno, "%s", filename); + *error = string_open_failed("%s", filename); *yield = FF_ERROR; return NULL; } @@ -768,7 +768,7 @@ if ((pid = exim_fork(US"router-interpret")) == 0) out: (void)close(fd); search_tidyup(); - exim_underbar_exit(0, US"rda"); + exim_underbar_exit(EXIT_SUCCESS); bad: DEBUG(D_rewrite) debug_printf("rda_interpret: failed write to pipe\n");