From: Willy Tarreau Date: Tue, 29 Apr 2014 17:52:16 +0000 (+0200) Subject: BUG/MINOR: auth: fix wrong return type in pat_match_auth() X-Git-Tag: v1.5-dev25~49 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=86e0fc1739f139fd80153413f65db05d9d799cd8;p=thirdparty%2Fhaproxy.git BUG/MINOR: auth: fix wrong return type in pat_match_auth() Commit 5338eea ("MEDIUM: pattern: The match function browse itself the list or the tree") changed the return type of pattern matching functions. One enum was left over in pat_match_auth(). Fortunately, this one equals zero where a null pointer is expected, so it's cast correctly. This detected and reported by Charles Carter was introduced in 1.5-dev23, no backport is needed. --- diff --git a/src/auth.c b/src/auth.c index ad606afb8c..2a53deb21f 100644 --- a/src/auth.c +++ b/src/auth.c @@ -267,7 +267,7 @@ pat_match_auth(struct sample *smp, struct pattern_expr *expr, int fill) /* Check if the userlist is present in the context data. */ if (!ul) - return PAT_NOMATCH; + return NULL; /* Browse the userlist for searching user. */ for (u = ul->users; u; u = u->next) {