check for problems with nulls */
| 929 | |
| 930 | /* check for problems with nulls */ |
| 931 | static void driver4(void) |
| 932 | { |
| 933 | uint8_t buf[1]; |
| 934 | uint32_t h; |
| 935 | uint32_t i; |
| 936 | uint32_t state[HASHSTATE]; |
| 937 | |
| 938 | buf[0] = ~0; |
| 939 | for (i=0; i<HASHSTATE; ++i) |
| 940 | state[i] = 1; |
| 941 | printf("These should all be different\n"); |
| 942 | h = 0; |
| 943 | for (i=0; i<8; ++i) { |
| 944 | h = jlu32l(h, buf, 0); |
| 945 | printf("%2ld 0-byte strings, hash is %.8x\n", (long)i, h); |
| 946 | } |
| 947 | } |
| 948 | |
| 949 | |
| 950 | int main(int argc, char ** argv) |