mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-09-20 15:26:13 +08:00
style
This commit is contained in:
parent
035572798e
commit
b6a448e391
|
@ -93,21 +93,19 @@ static uint8_t calc_pos(const uint8_t *d) {
|
||||||
|
|
||||||
// Copy an existing buffer into client trace buffer
|
// 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?
|
// 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)
|
bool ImportTraceBuffer(uint8_t *trace_src, uint16_t trace_len) {
|
||||||
{
|
if (trace_len == 0 || trace_src == NULL) return (false);
|
||||||
if (trace_len == 0 || trace_src == NULL) return(false);
|
|
||||||
if (gs_trace) {
|
if (gs_trace) {
|
||||||
free(gs_trace);
|
free(gs_trace);
|
||||||
gs_traceLen = 0;
|
gs_traceLen = 0;
|
||||||
}
|
}
|
||||||
gs_trace = calloc(trace_len, sizeof(uint8_t));
|
gs_trace = calloc(trace_len, sizeof(uint8_t));
|
||||||
if (gs_trace == NULL)
|
if (gs_trace == NULL) {
|
||||||
{
|
return (false);
|
||||||
return(false);
|
|
||||||
}
|
}
|
||||||
memcpy(gs_trace, trace_src, trace_len);
|
memcpy(gs_trace, trace_src, trace_len);
|
||||||
gs_traceLen = trace_len;
|
gs_traceLen = trace_len;
|
||||||
return(true);
|
return (true);
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint8_t extract_uid[10] = {0};
|
static uint8_t extract_uid[10] = {0};
|
||||||
|
|
|
@ -12160,6 +12160,6 @@
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"commands_extracted": 703,
|
"commands_extracted": 703,
|
||||||
"extracted_by": "PM3Help2JSON v1.00",
|
"extracted_by": "PM3Help2JSON v1.00",
|
||||||
"extracted_on": "2024-01-01T20:49:58"
|
"extracted_on": "2024-01-02T20:54:40"
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue