forked from 0xha0/df_datalink
omit redundant code
This commit is contained in:
@@ -660,10 +660,10 @@ int32_t Linklayer_Init(L2_INST **instPtr, const L2_CONFIG *config)
|
||||
DBG_ERROR("Allocate memory for L2_InstPtr failed.\n");
|
||||
return ENOMEM;
|
||||
}
|
||||
|
||||
// Clear random content
|
||||
memset(*instPtr, 0x00, sizeof(L2_INST));
|
||||
memcpy(&((*instPtr)->config), config, sizeof(L2_CONFIG));
|
||||
// Clear log
|
||||
memset(&((*instPtr)->log), 0x00, sizeof((*instPtr)->log));
|
||||
|
||||
// Packet buffer
|
||||
(*instPtr)->sendPktData = calloc(L2_PACK_LEN_MAX / sizeof(uint64_t), sizeof(uint64_t));
|
||||
|
||||
Reference in New Issue
Block a user