bug: use uint32_t for IP numbers

There where long and unsigned long used for IPs in use which
caused occasional off by one errors. The word occasional should
be read: pretty much every one with large enough configuration
has been affected.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
Sami Kerola 2011-07-08 16:28:22 +02:00
parent 3c1d033a79
commit 1e82461875
5 changed files with 23 additions and 19 deletions

View file

@ -44,9 +44,9 @@
/* Sort functions for range sorting */
int intcomp(const void *x, const void *y)
{
if (*(unsigned long int *) x < *(unsigned long int *) y)
if (*(uint32_t *) x < *(uint32_t *) y)
return -1;
else if (*(unsigned long int *) y < *(unsigned long int *) x)
else if (*(uint32_t *) y < *(uint32_t *) x)
return 1;
else
return 0;