diff options
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/commands/lockcmds.c | 3 | ||||
-rw-r--r-- | src/backend/tsearch/spell.c | 8 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/backend/commands/lockcmds.c b/src/backend/commands/lockcmds.c index df681e32341..97cf0bc4add 100644 --- a/src/backend/commands/lockcmds.c +++ b/src/backend/commands/lockcmds.c @@ -219,7 +219,8 @@ LockViewRecurse_walker(Node *node, LockViewRecurse_context *context) * skipped. */ if (relid == context->viewoid && - (!strcmp(rte->eref->aliasname, "old") || !strcmp(rte->eref->aliasname, "new"))) + (strcmp(rte->eref->aliasname, "old") == 0 || + strcmp(rte->eref->aliasname, "new") == 0)) continue; /* Currently, we only allow plain tables or views to be locked. */ diff --git a/src/backend/tsearch/spell.c b/src/backend/tsearch/spell.c index eb39466b228..c715f06b8e2 100644 --- a/src/backend/tsearch/spell.c +++ b/src/backend/tsearch/spell.c @@ -1749,8 +1749,8 @@ NISortDictionary(IspellDict *Conf) naffix = 0; for (i = 0; i < Conf->nspell; i++) { - 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->Spell[i - 1]->p.flag) != 0) naffix++; } @@ -1764,8 +1764,8 @@ NISortDictionary(IspellDict *Conf) curaffix = -1; for (i = 0; i < Conf->nspell; i++) { - if (i == 0 - || strcmp(Conf->Spell[i]->p.flag, Conf->AffixData[curaffix])) + if (i == 0 || + strcmp(Conf->Spell[i]->p.flag, Conf->AffixData[curaffix]) != 0) { curaffix++; Assert(curaffix < naffix); |