mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-07-07 21:51:17 -07:00
Fixed compiler error
This commit is contained in:
parent
df3e429d71
commit
c54d1394c6
1 changed files with 13 additions and 12 deletions
|
@ -79,26 +79,27 @@ size_t getFromGraphBuf(uint8_t *buff)
|
||||||
// Get or auto-detect clock rate
|
// Get or auto-detect clock rate
|
||||||
int GetClock(const char *str, int peak, int verbose)
|
int GetClock(const char *str, int peak, int verbose)
|
||||||
{
|
{
|
||||||
int clock;
|
int clock;
|
||||||
sscanf(str, "%i", &clock);
|
sscanf(str, "%i", &clock);
|
||||||
if (!strcmp(str, ""))
|
if (!strcmp(str, ""))
|
||||||
clock = 0;
|
clock = 0;
|
||||||
|
|
||||||
// Auto-detect clock
|
// Auto-detect clock
|
||||||
if (!clock)
|
if (!clock)
|
||||||
{
|
{
|
||||||
uint8_t grph[MAX_GRAPH_TRACE_LEN]={0};
|
uint8_t grph[MAX_GRAPH_TRACE_LEN]={0};
|
||||||
size_t size = getFromGraphBuf(grph);
|
size_t size = getFromGraphBuf(grph);
|
||||||
if ( size < 0 ) {
|
if ( size < 0 ) {
|
||||||
PrintAndLog("Failed to copy from graphbuffer");
|
PrintAndLog("Failed to copy from graphbuffer");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
clock = DetectASKClock(grph,size,0);
|
clock = DetectASKClock(grph,size,0);
|
||||||
// Only print this message if we're not looping something
|
// Only print this message if we're not looping something
|
||||||
if (!verbose){
|
if (!verbose){
|
||||||
PrintAndLog("Auto-detected clock rate: %d", clock);
|
PrintAndLog("Auto-detected clock rate: %d", clock);
|
||||||
}
|
}
|
||||||
return clock;
|
}
|
||||||
|
return clock;
|
||||||
}
|
}
|
||||||
|
|
||||||
// A simple test to see if there is any data inside Graphbuffer.
|
// A simple test to see if there is any data inside Graphbuffer.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue