X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/955228691e95dcd9d8be6ee0702f6ce76013cc0c..b86225188edcbcd6af6a545920115d67130882bc:/client/cmdlf.c diff --git a/client/cmdlf.c b/client/cmdlf.c index 2c33dba9..6bfbec8d 100644 --- a/client/cmdlf.c +++ b/client/cmdlf.c @@ -128,7 +128,6 @@ int CmdLFCommandRead(const char *Cmd) { bool useHighFreq = FALSE; uint16_t one = 0, zero = 0; uint8_t cmdp = 0; - int strLength = 0; UsbCommand c = {CMD_MOD_THEN_ACQUIRE_RAW_ADC_SAMPLES_125K, {0,0,0}}; while(param_getchar(Cmd, cmdp) != 0x00) { @@ -143,7 +142,7 @@ int CmdLFCommandRead(const char *Cmd) { cmdp++; break; case 'c': - strLength = param_getstr(Cmd, cmdp+1, (char *)&c.d.asBytes); + param_getstr(Cmd, cmdp+1, (char *)&c.d.asBytes); cmdp+=2; break; case 'd': @@ -172,7 +171,7 @@ int CmdLFCommandRead(const char *Cmd) { if (errors) return usage_lf_cmdread(); // zero and one lengths - c.arg[1] = zero << 16 | one; + c.arg[1] = (uint32_t)(zero << 16 | one); // add frequency 125 or 134 c.arg[2] = useHighFreq; @@ -982,7 +981,7 @@ int CmdVchDemod(const char *Cmd) for (i = 0; i < (GraphTraceLen-2048); i++) { int sum = 0; int j; - for (j = 0; j < arraylen(SyncPattern); j++) { + for (j = 0; j < ARRAYLEN(SyncPattern); j++) { sum += GraphBuffer[i+j]*SyncPattern[j]; } if (sum > bestCorrel) {