[tuxdroid-user] cmd_dispatch size inconsistency
Status: Beta
Brought to you by:
ks156
From: neimad <ro...@fr...> - 2007-06-03 15:58:41
|
Hello again, In usb_get_status_TuxDroid(), cmd_dispath is declared as being unsigned char [5]. Entries 0..3 are used indeed, but entry 4 looks like it's merely an "end of string" byte (being always 0) and it's never used in update_raw_status_table(). The latter only accesses entries 0..3 of the array, but its parameter is declared as being unsigned char [TUX_RECV_LENGTH] (ugly, btw) whose value happens to be 0x05. Is that the "same 5" (if I may say) than the 5 in the declaration of cmd_dispatch[5] in usb_get_status_TuxDroid() ? If the terminal 0 is of no use, as it seems, usb_get_status_TuxDroid() could be greatly simplified. Damien |