Commit f66f15e1 authored by Michael Tremer's avatar Michael Tremer

database: Make level variable unsigned (as used in log messages)

Signed-off-by: default avatarMichael Tremer <michael.tremer@ipfire.org>
parent 372af0e0
......@@ -17,3 +17,6 @@ print(a)
# Search for an IP address in the database
n = d.lookup("8.8.8.8")
print(n)
n = d.lookup("2a07:1c44:5800:1234:1234:1234:1234:1234")
print(n)
......@@ -453,7 +453,7 @@ static int __loc_database_lookup_handle_leaf(struct loc_database* db, const stru
// Returns the highest result available
static int __loc_database_lookup_max(struct loc_database* db, const struct in6_addr* address,
struct loc_network** network, struct in6_addr* network_address,
const struct loc_database_network_node_v0* node, int level) {
const struct loc_database_network_node_v0* node, unsigned int level) {
// If the node is a leaf node, we end here
if (__loc_database_node_is_leaf(node))
return __loc_database_lookup_handle_leaf(db, address, network, network_address, node);
......@@ -501,7 +501,7 @@ static int __loc_database_lookup_max(struct loc_database* db, const struct in6_a
// Searches for an exact match along the path
static int __loc_database_lookup(struct loc_database* db, const struct in6_addr* address,
struct loc_network** network, struct in6_addr* network_address,
const struct loc_database_network_node_v0* node, int level) {
const struct loc_database_network_node_v0* node, unsigned int level) {
// If the node is a leaf node, we end here
if (__loc_database_node_is_leaf(node))
return __loc_database_lookup_handle_leaf(db, address, network, network_address, node);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment