aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2007-07-15 22:57:48 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2007-07-15 22:57:48 +0000
commita190eb3d7dbe7bafb944b8b3ac9d3b867fcba536 (patch)
treef7dd364e3da87f4581e6d934ef7a8e3a87991b3f
parent84a0445c4d48f2254cd3a248b5e4bda8c64c0190 (diff)
downloadpostgresql-a190eb3d7dbe7bafb944b8b3ac9d3b867fcba536.tar.gz
postgresql-a190eb3d7dbe7bafb944b8b3ac9d3b867fcba536.zip
Avoid possibly-unportable initializer, per buildfarm warning.
-rw-r--r--contrib/tsearch2/dict_thesaurus.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/contrib/tsearch2/dict_thesaurus.c b/contrib/tsearch2/dict_thesaurus.c
index b61c149aff1..cb5d9cbb784 100644
--- a/contrib/tsearch2/dict_thesaurus.c
+++ b/contrib/tsearch2/dict_thesaurus.c
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/contrib/tsearch2/dict_thesaurus.c,v 1.8 2007/02/01 19:10:23 momjian Exp $ */
+/* $PostgreSQL: pgsql/contrib/tsearch2/dict_thesaurus.c,v 1.9 2007/07/15 22:57:48 tgl Exp $ */
/*
* thesaurus
@@ -696,11 +696,14 @@ thesaurus_init(PG_FUNCTION_ARGS)
static LexemeInfo *
findTheLexeme(DictThesaurus * d, char *lexeme)
{
- TheLexeme key = {lexeme, NULL}, *res;
+ TheLexeme key, *res;
if (d->nwrds == 0)
return NULL;
+ key.lexeme = lexeme;
+ key.entries = NULL;
+
res = bsearch(&key, d->wrds, d->nwrds, sizeof(TheLexeme), cmpLexemeQ);
if (res == NULL)