- do{
- memcpy(&item, cmdlist, sizeof(cmdlist_entry_t));
- cmdlist += 1;
- }while(item.cmd_name!=NULL && strcmp(fw, item.cmd_name));
- if(item.cmd_name==NULL){
+ while(cmdlist->cmd_name && strcmp(fw, cmdlist->cmd_name)){
+ ++cmdlist;
+ }
+ if(!cmdlist->cmd_name){