From bfd3f37be309c3647844aed937e6a66aad5fd3cb Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 29 Oct 2010 15:51:52 -0400 Subject: Fix comparisons of pointers with zero to compare with NULL instead. Per C standard, these are semantically the same thing; but saying NULL when you mean NULL is good for readability. Marti Raudsepp, per results of INRIA's Coccinelle. --- src/backend/regex/regc_lex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/backend/regex') diff --git a/src/backend/regex/regc_lex.c b/src/backend/regex/regc_lex.c index da3ff0bf384..3360cfb0e9f 100644 --- a/src/backend/regex/regc_lex.c +++ b/src/backend/regex/regc_lex.c @@ -846,7 +846,7 @@ lexescape(struct vars * v) if (ISERR()) FAILW(REG_EESCAPE); /* ugly heuristic (first test is "exactly 1 digit?") */ - if (v->now - save == 0 || ((int) c > 0 && (int) c <= v->nsubexp)) + if (v->now == save || ((int) c > 0 && (int) c <= v->nsubexp)) { NOTE(REG_UBACKREF); RETV(BACKREF, (chr) c); -- cgit v1.2.3