diff options
author | Teodor Sigaev <teodor@sigaev.ru> | 2005-03-31 15:12:08 +0000 |
---|---|---|
committer | Teodor Sigaev <teodor@sigaev.ru> | 2005-03-31 15:12:08 +0000 |
commit | 7d19650a793969f49eef585c886ad3342911253f (patch) | |
tree | 4498b6f52f60bee426685882206e0b3013ea7035 /contrib/tsearch2/wparser.c | |
parent | 12fa5c57acd845096247c7e0d9a78c61d169598f (diff) |
Fix various comparing functions
Diffstat (limited to 'contrib/tsearch2/wparser.c')
-rw-r--r-- | contrib/tsearch2/wparser.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/tsearch2/wparser.c b/contrib/tsearch2/wparser.c index b7e45e51885..7945357531e 100644 --- a/contrib/tsearch2/wparser.c +++ b/contrib/tsearch2/wparser.c @@ -87,7 +87,9 @@ reset_prs(void) static int compareprs(const void *a, const void *b) { - return ((WParserInfo *) a)->prs_id - ((WParserInfo *) b)->prs_id; + if ( ((WParserInfo *) a)->prs_id == ((WParserInfo *) b)->prs_id ) + return 0; + return ( ((WParserInfo *) a)->prs_id < ((WParserInfo *) b)->prs_id ) ? -1 : 1; } WParserInfo * |