From c54d1394c69fbe8199cf96f9e0ddb5172e71682c Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Thu, 22 Jan 2015 00:10:09 +0100 Subject: [PATCH] Fixed compiler error --- client/graph.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/client/graph.c b/client/graph.c index 0f998fe1..269c2dd9 100644 --- a/client/graph.c +++ b/client/graph.c @@ -79,26 +79,27 @@ size_t getFromGraphBuf(uint8_t *buff) // Get or auto-detect clock rate int GetClock(const char *str, int peak, int verbose) { - int clock; - sscanf(str, "%i", &clock); - if (!strcmp(str, "")) - clock = 0; + int clock; + sscanf(str, "%i", &clock); + if (!strcmp(str, "")) + clock = 0; // Auto-detect clock - if (!clock) - { - uint8_t grph[MAX_GRAPH_TRACE_LEN]={0}; + if (!clock) + { + uint8_t grph[MAX_GRAPH_TRACE_LEN]={0}; size_t size = getFromGraphBuf(grph); if ( size < 0 ) { PrintAndLog("Failed to copy from graphbuffer"); return -1; } - clock = DetectASKClock(grph,size,0); + clock = DetectASKClock(grph,size,0); // Only print this message if we're not looping something - if (!verbose){ - PrintAndLog("Auto-detected clock rate: %d", clock); - } - return clock; + if (!verbose){ + PrintAndLog("Auto-detected clock rate: %d", clock); + } + } + return clock; } // A simple test to see if there is any data inside Graphbuffer. -- 2.39.5