bug: use uint32_t for IP numbers

The commit 1e82461875 was
incomplete, and at the end was a cause of off by one miscount.
The reason was bsearch where long int needed to be unsigned.
Weird that the original had work while there where so many type
mismatches.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
Sami Kerola 2011-07-09 23:32:25 +02:00
parent f51f2e9fe1
commit f9eb53a215
2 changed files with 8 additions and 8 deletions

View file

@ -64,7 +64,7 @@ int prepare_data(void)
for (i = 0; i < num_touches; i++) {
if (bsearch
(&touches[i], leases, (size_t) num_leases,
sizeof(long int), &intcomp) == NULL) {
sizeof(uint32_t), &intcomp) == NULL) {
touches[j] = touches[i];
j++;
}