mirror of
https://github.com/postgres/postgres.git
synced 2025-05-17 06:41:24 +03:00
Fix various comparing functions
This commit is contained in:
parent
12fa5c57ac
commit
7d19650a79
@ -88,7 +88,9 @@ reset_dict(void)
|
||||
static int
|
||||
comparedict(const void *a, const void *b)
|
||||
{
|
||||
return ((DictInfo *) a)->dict_id - ((DictInfo *) b)->dict_id;
|
||||
if ( ((DictInfo *) a)->dict_id == ((DictInfo *) b)->dict_id )
|
||||
return 0;
|
||||
return ( ((DictInfo *) a)->dict_id < ((DictInfo *) b)->dict_id ) ? -1 : 1;
|
||||
}
|
||||
|
||||
DictInfo *
|
||||
|
@ -386,7 +386,7 @@ static int
|
||||
compareDocR(const void *a, const void *b)
|
||||
{
|
||||
if (((DocRepresentation *) a)->pos == ((DocRepresentation *) b)->pos)
|
||||
return 1;
|
||||
return 0;
|
||||
return (((DocRepresentation *) a)->pos > ((DocRepresentation *) b)->pos) ? 1 : -1;
|
||||
}
|
||||
|
||||
@ -652,7 +652,7 @@ static int
|
||||
compareDocWord(const void *a, const void *b)
|
||||
{
|
||||
if (((DocWord *) a)->pos == ((DocWord *) b)->pos)
|
||||
return 1;
|
||||
return 0;
|
||||
return (((DocWord *) a)->pos > ((DocWord *) b)->pos) ? 1 : -1;
|
||||
}
|
||||
|
||||
|
@ -181,7 +181,9 @@ reset_cfg(void)
|
||||
static int
|
||||
comparecfg(const void *a, const void *b)
|
||||
{
|
||||
return ((TSCfgInfo *) a)->id - ((TSCfgInfo *) b)->id;
|
||||
if ( ((TSCfgInfo *) a)->id == ((TSCfgInfo *) b)->id )
|
||||
return 0;
|
||||
return ( ((TSCfgInfo *) a)->id < ((TSCfgInfo *) b)->id ) ? -1 : 1;
|
||||
}
|
||||
|
||||
TSCfgInfo *
|
||||
|
@ -51,7 +51,7 @@ static int
|
||||
comparePos(const void *a, const void *b)
|
||||
{
|
||||
if (((WordEntryPos *) a)->pos == ((WordEntryPos *) b)->pos)
|
||||
return 1;
|
||||
return 0;
|
||||
return (((WordEntryPos *) a)->pos > ((WordEntryPos *) b)->pos) ? 1 : -1;
|
||||
}
|
||||
|
||||
|
@ -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 *
|
||||
|
Loading…
x
Reference in New Issue
Block a user