Just for people doing this exercise too. There is a typo in the display of an error condition in the testfile radixmap_tests.c
of the book on page 238 line 31 of the code:
if (d1.data.key > d2.data.key) {
debug("FAIL:i=%u, key: %u, value: %u, equals max? %d\n", i,
d1.data.key, d1.data.value,
d2.data.key == UINT32_MAX); <--------- d2 should be d1
return 0;
}
Obviously only the larger of the two could be UINT32_MAX
.
Kind regards, Guus.