Skip to content
Snippets Groups Projects
Commit 94ac1d28 authored by Jan Kadlec's avatar Jan Kadlec
Browse files

Fixed wrong casting.

parent ecdac251
Branches
Tags
No related merge requests found
......@@ -22,8 +22,8 @@
int compare_rrset_types( void *key1, void *key2 )
{
return (*((uint8_t *)key1) == *((uint8_t *)key2) ?
0 : *((uint8_t *)key1) < *((uint8_t *)key2) ? -1 : 1);
return (*((uint16_t *)key1) == *((uint16_t *)key2) ?
0 : *((uint16_t *)key1) < *((uint16_t *)key2) ? -1 : 1);
}
dnslib_node_t *dnslib_node_new( dnslib_dname_t *owner, dnslib_node_t *parent )
......
......@@ -153,10 +153,10 @@ static int test_node_sorting()
node = skip_first(tmp->rrsets);
int last = *((int *)node->key);
int last = *((uint16_t *)node->key);
while ((node = skip_next(node))!=NULL) {
if (last > *((int *)node->key)) {
if (last > *((uint16_t *)node->key)) {
errors++;
diag("RRset sorting error");
}
......
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