Re: Suspicious strcmp() in src/backend/parser/parse_expr.c
David Rowley <david.rowley@2ndquadrant.com>
From: David Rowley <david.rowley@2ndquadrant.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Andrew Gierth <andrew@tao11.riddles.org.uk>, Rikard Falkeborn <rikard.falkeborn@gmail.com>, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2019-04-11T14:06:11Z
Lists: pgsql-bugs
On Thu, 11 Apr 2019 at 18:51, Michael Paquier <michael@paquier.xyz> wrote: > > On Thu, Apr 11, 2019 at 12:55:49AM -0400, Tom Lane wrote: > > I'd be +1 for that, just on the grounds of having consistent coding > > style. But I'm not sufficiently excited about it to do the work > > myself ... > > Well, here you go as per the attached as we are on it. I am not > noticing any other spots. Patch looks fine to me. I also made a quick pass and noticed a few more things out of place. formatting.c in NUM_prepare_locale() else if (strcmp(Np->decimal, ",") !=0) spell.c in NISortDictionary() if (i == 0 || strcmp(Conf->Spell[i]->p.flag, Conf->Spell[i - 1]->p.flag)) if (i == 0 || strcmp(Conf->Spell[i]->p.flag, Conf->AffixData[curaffix])) -- David Rowley http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
Commits
-
Fix more strcmp() calls using boolean-like comparisons for result checks
- d527fda62167 12.0 landed
-
Fix backwards test in operator_precedence_warning logic.
- b9b7fe8ca452 9.5.17 landed
- 62d495395619 9.6.13 landed
- 99bbff5c1579 10.8 landed
- 930930c47663 11.3 landed
- 4cae471d1b6b 12.0 landed