fix coverity #910754
This commit is contained in:
1 parent
b18c274612
commit
dc5e213420
4 files changed
+9
-5
No files matched your search
@@ -89,7 +89,7 @@ static void RAMFUNC SniffAndStore(uint8_t param) {
|
||||
Uart14aInit(receivedCmd, MAX_FRAME_SIZE, receivedCmdPar);
|
||||
|
||||
// Setup and start DMA.
|
||||
if (!FpgaSetupSscDma((uint8_t *)dmaBuf, DMA_BUFFER_SIZE)) {
|
||||
if (FpgaSetupSscDma((uint8_t *)dmaBuf, DMA_BUFFER_SIZE) == false) {
|
||||
if (g_dbglevel > DBG_ERROR) {
|
||||
Dbprintf("FpgaSetupSscDma failed. Exiting");
|
||||
}
|
||||
|
||||
+1
-1
@@ -2603,7 +2603,7 @@ void SniffIso14443b(void) {
|
||||
dmabuf16_t *dma = get_dma16();
|
||||
|
||||
// Setup and start DMA.
|
||||
if (!FpgaSetupSscDma((uint8_t *) dma->buf, DMA_BUFFER_SIZE)) {
|
||||
if (FpgaSetupSscDma((uint8_t *) dma->buf, DMA_BUFFER_SIZE) == false) {
|
||||
if (g_dbglevel > DBG_ERROR) DbpString("FpgaSetupSscDma failed. Exiting");
|
||||
switch_off();
|
||||
return;
|
||||
|
||||
@@ -83,8 +83,8 @@ void RAMFUNC SniffMifare(uint8_t param) {
|
||||
|
||||
// Setup and start DMA.
|
||||
// set transfer address and number of bytes. Start transfer.
|
||||
if (!FpgaSetupSscDma(dmaBuf, DMA_BUFFER_SIZE)) {
|
||||
if (g_dbglevel > DBG_ERROR) Dbprintf("[!] FpgaSetupSscDma failed. Exiting");
|
||||
if (FpgaSetupSscDma(dmaBuf, DMA_BUFFER_SIZE) == false) {
|
||||
if (g_dbglevel > DBG_ERROR) Dbprintf("FpgaSetupSscDma failed. Exiting");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+5
-1
@@ -403,7 +403,11 @@ bool hid_config_card_jam(const uint8_t *cmd, int len, uint8_t *dma_buf) {
|
||||
|
||||
// Restore sniffer FPGA mode and re-arm DMA
|
||||
FpgaWriteConfWord(FPGA_MAJOR_MODE_HF_ISO14443A | FPGA_HF_ISO14443A_SNIFFER);
|
||||
FpgaSetupSscDma(dma_buf, DMA_BUFFER_SIZE);
|
||||
|
||||
if (FpgaSetupSscDma(dma_buf, DMA_BUFFER_SIZE) == false) {
|
||||
if (g_dbglevel > DBG_ERROR) Dbprintf("FpgaSetupSscDma failed. Exiting");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user