diff options
| author | Tom Lane | 2020-09-04 18:32:10 +0000 |
|---|---|---|
| committer | Tom Lane | 2020-09-04 18:32:19 +0000 |
| commit | 38a2d703298c9a891dc9c24c0c087f417f555c70 (patch) | |
| tree | 5c8dfa0662efa40432bf05f7f2029c2ad198bac4 /src/backend/tsearch | |
| parent | 3eb3d3e7822d5eecfcaba871a90263c6025c5216 (diff) | |
Remove some more useless assignments.
Found with clang's scan-build tool. It also whines about a lot of
other dead stores that we should *not* change IMO, either as a matter
of style or future-proofing. But these places seem like clear
oversights.
Discussion: https://postgr.es/m/CAEudQAo1+AcGppxDSg8k+zF4+Kv+eJyqzEDdbpDg58-=MQcerQ@mail.gmail.com
Diffstat (limited to 'src/backend/tsearch')
| -rw-r--r-- | src/backend/tsearch/spell.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/tsearch/spell.c b/src/backend/tsearch/spell.c index 8aab96d3b06..49735bc06af 100644 --- a/src/backend/tsearch/spell.c +++ b/src/backend/tsearch/spell.c @@ -2124,7 +2124,6 @@ CheckAffix(const char *word, size_t len, AFFIX *Affix, int flagflags, char *neww } else { - int err; pg_wchar *data; size_t data_len; int newword_len; @@ -2134,7 +2133,8 @@ CheckAffix(const char *word, size_t len, AFFIX *Affix, int flagflags, char *neww data = (pg_wchar *) palloc((newword_len + 1) * sizeof(pg_wchar)); data_len = pg_mb2wchar_with_len(newword, data, newword_len); - if (!(err = pg_regexec(&(Affix->reg.regex), data, data_len, 0, NULL, 0, NULL, 0))) + if (pg_regexec(&(Affix->reg.regex), data, data_len, + 0, NULL, 0, NULL, 0) == REG_OKAY) { pfree(data); return newword; |
