Make implicit casts in DHT.c and network.c explicit