Skip to content

Commit

Permalink
Make source_compare consistent: also compare src_plen.
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthieu Boutier authored and jech committed May 18, 2017
1 parent 61e4d89 commit 221c60c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions source.c
Expand Up @@ -56,6 +56,11 @@ source_compare(const unsigned char *id,
if(rc != 0)
return rc;

if(src_plen < src->src_plen)
return -1;
if(src_plen > src->src_plen)
return 1;

rc = memcmp(src_prefix, src->src_prefix, 16);
if(rc != 0)
return rc;
Expand Down

0 comments on commit 221c60c

Please sign in to comment.