mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-17 08:16:59 +00:00
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:
parent
3c1d033a79
commit
1e82461875
5 changed files with 23 additions and 19 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue