[Tinyos-devel] CPM hashtable implementation question

Chieh-Jan (Mike) Liang cliang4 at cs.jhu.edu
Thu Oct 25 10:01:43 PDT 2007

In hashtable_private.h, struct entry has a void pointer named k. I think 
k should be char[NOISE_HISTORY] instead. If you look at 
hashtable_search(...) in hashtable.c, it compares e->k to the k passed 
in. Since e->k is set to point to k in hashtable_insert(...), this 
comparison will always return true. Therefore, I think 
hashtable_insert(...) should copy the content of k to e->k instead.

Please let me know if I am missing something.

Thank you


More information about the Tinyos-devel mailing list