This commit is contained in:
iceman1001 committed 2024-01-02 21:55:04 +01:00
1 parent 035572798e
commit b6a448e391
2 files changed
+6 -8

No files matched your search

+5 -7
View File
@@ -93,21 +93,19 @@ static uint8_t calc_pos(const uint8_t *d) {
// Copy an existing buffer into client trace buffer
// I think this is cleaner than further globalizing gs_trace, and may lend itself to more modularity later?
bool ImportTraceBuffer(uint8_t *trace_src, uint16_t trace_len)
{
if (trace_len == 0 || trace_src == NULL) return(false);
bool ImportTraceBuffer(uint8_t *trace_src, uint16_t trace_len) {
if (trace_len == 0 || trace_src == NULL) return (false);
if (gs_trace) {
free(gs_trace);
gs_traceLen = 0;
}
gs_trace = calloc(trace_len, sizeof(uint8_t));
if (gs_trace == NULL)
{
return(false);
if (gs_trace == NULL) {
return (false);
}
memcpy(gs_trace, trace_src, trace_len);
gs_traceLen = trace_len;
return(true);
return (true);
}
static uint8_t extract_uid[10] = {0};