FIX: Coverity, unchecked return value, CID #121292,..

basicallty the flush queue commmand is replaced with clearCommandBuffer();.
This commit is contained in:
iceman1001
2016-01-12 22:30:22 +01:00
parent 1d42f25fcd
commit 28415b5d90
8 changed files with 30 additions and 23 deletions

View File

@@ -16,11 +16,13 @@ static int CmdHelp(const char *Cmd);
int CmdHFDESReader(const char *Cmd)
{
UsbCommand c ={CMD_MIFARE_DES_READER, {3, 0x60, 0}};
UsbCommand c = { CMD_MIFARE_DES_READER, {3, 0x60, 0} };
SendCommand(&c);
UsbCommand resp;
WaitForResponseTimeout(CMD_ACK,&resp,2000);
if (!WaitForResponseTimeout(CMD_ACK,&resp,2000) ){
PrintAndLog("Command time-out");
return 1;
}
return 0;
}
@@ -57,7 +59,8 @@ static command_t CommandTable[] =
int CmdHFDES(const char *Cmd)
{
//flush
WaitForResponseTimeout(CMD_ACK,NULL,100);
clearCommandBuffer();
//WaitForResponseTimeout(CMD_ACK,NULL,100);
CmdsParse(CommandTable, Cmd);
return 0;
}