mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
fix comparison, unsigned does not become negative.
git-svn-id: file:///svn/unbound/trunk@4057 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
f374268521
commit
a83c7764f5
1 changed files with 5 additions and 1 deletions
|
|
@ -1277,7 +1277,11 @@ anchors_delete_insecure(struct val_anchors* anchors, uint16_t c,
|
|||
static int
|
||||
keytag_compare(const void* x, const void* y)
|
||||
{
|
||||
return *(uint16_t*)x - *(uint16_t*)y;
|
||||
if(*(uint16_t*)x == *(uint16_t*)y)
|
||||
return 0;
|
||||
if(*(uint16_t*)x > *(uint16_t*)y)
|
||||
return 1;
|
||||
return -1;
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
|||
Loading…
Reference in a new issue