mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
style
This commit is contained in:
parent
035572798e
commit
b6a448e391
2 changed files with 6 additions and 8 deletions
|
@ -93,16 +93,14 @@ 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);
|
||||||
|
|
|
@ -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…
Add table
Add a link
Reference in a new issue