mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 10:37:23 -07:00
structs: initializes explicitely all fields, so we can detect when we really forgot one [-Wmissing-field-initializers]
This commit is contained in:
parent
af3397bd19
commit
0ab6de64d4
43 changed files with 211 additions and 211 deletions
|
@ -508,7 +508,7 @@ int CmdLegicRfSim(const char *Cmd) {
|
|||
char cmdp = tolower(param_getchar(Cmd, 0));
|
||||
if (strlen(Cmd) == 0 || cmdp == 'h') return usage_legic_sim();
|
||||
|
||||
UsbCommand c = {CMD_SIMULATE_TAG_LEGIC_RF, {1}};
|
||||
UsbCommand c = {CMD_SIMULATE_TAG_LEGIC_RF, {1}, {{0}}};
|
||||
sscanf(Cmd, " %" SCNi64, &c.arg[0]);
|
||||
clearCommandBuffer();
|
||||
SendCommand(&c);
|
||||
|
@ -626,7 +626,7 @@ int CmdLegicRfWrite(const char *Cmd) {
|
|||
|
||||
PrintAndLogEx(SUCCESS, "Writing to tag");
|
||||
|
||||
UsbCommand c = {CMD_WRITER_LEGIC_RF, {offset, len, IV}};
|
||||
UsbCommand c = {CMD_WRITER_LEGIC_RF, {offset, len, IV}, {{0}}};
|
||||
memcpy(c.d.asBytes, data, len);
|
||||
UsbCommand resp;
|
||||
clearCommandBuffer();
|
||||
|
@ -740,7 +740,7 @@ int legic_read_mem(uint32_t offset, uint32_t len, uint32_t iv, uint8_t *out, uin
|
|||
|
||||
legic_chk_iv(&iv);
|
||||
|
||||
UsbCommand c = {CMD_READER_LEGIC_RF, {offset, len, iv}};
|
||||
UsbCommand c = {CMD_READER_LEGIC_RF, {offset, len, iv}, {{0}}};
|
||||
clearCommandBuffer();
|
||||
SendCommand(&c);
|
||||
UsbCommand resp;
|
||||
|
@ -794,7 +794,7 @@ int legic_get_type(legic_card_select_t *card) {
|
|||
|
||||
if (card == NULL) return 1;
|
||||
|
||||
UsbCommand c = {CMD_LEGIC_INFO, {0, 0, 0}};
|
||||
UsbCommand c = {CMD_LEGIC_INFO, {0, 0, 0}, {{0}}};
|
||||
clearCommandBuffer();
|
||||
SendCommand(&c);
|
||||
UsbCommand resp;
|
||||
|
@ -821,7 +821,7 @@ void legic_chk_iv(uint32_t *iv) {
|
|||
}
|
||||
void legic_seteml(uint8_t *src, uint32_t offset, uint32_t numofbytes) {
|
||||
|
||||
UsbCommand c = {CMD_LEGIC_ESET, {0, 0, 0}};
|
||||
UsbCommand c = {CMD_LEGIC_ESET, {0, 0, 0}, {{0}}};
|
||||
for (size_t i = offset; i < numofbytes; i += USB_CMD_DATA_SIZE) {
|
||||
|
||||
size_t len = MIN((numofbytes - i), USB_CMD_DATA_SIZE);
|
||||
|
@ -903,7 +903,7 @@ int CmdLegicDump(const char *Cmd) {
|
|||
legic_print_type(dumplen, 0);
|
||||
PrintAndLogEx(SUCCESS, "Reading tag memory %d b...", dumplen);
|
||||
|
||||
UsbCommand c = {CMD_READER_LEGIC_RF, {0x00, dumplen, 0x55}};
|
||||
UsbCommand c = {CMD_READER_LEGIC_RF, {0x00, dumplen, 0x55}, {{0}}};
|
||||
clearCommandBuffer();
|
||||
SendCommand(&c);
|
||||
UsbCommand resp;
|
||||
|
@ -1052,7 +1052,7 @@ int CmdLegicRestore(const char *Cmd) {
|
|||
PrintAndLogEx(SUCCESS, "Restoring to card");
|
||||
|
||||
// transfer to device
|
||||
UsbCommand c = {CMD_WRITER_LEGIC_RF, {0, 0, 0x55}};
|
||||
UsbCommand c = {CMD_WRITER_LEGIC_RF, {0, 0, 0x55}, {{0}}};
|
||||
UsbCommand resp;
|
||||
for (size_t i = 7; i < numofbytes; i += USB_CMD_DATA_SIZE) {
|
||||
|
||||
|
@ -1245,7 +1245,7 @@ int CmdLegicWipe(const char *Cmd) {
|
|||
PrintAndLogEx(SUCCESS, "Erasing");
|
||||
|
||||
// transfer to device
|
||||
UsbCommand c = {CMD_WRITER_LEGIC_RF, {0, 0, 0x55}};
|
||||
UsbCommand c = {CMD_WRITER_LEGIC_RF, {0, 0, 0x55}, {{0}}};
|
||||
UsbCommand resp;
|
||||
for (size_t i = 7; i < card.cardsize; i += USB_CMD_DATA_SIZE) {
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue