Indented.
This commit is contained in:
@@ -170,7 +170,7 @@ static void snap_received_packet(
|
||||
{
|
||||
uint16_t mtu_len = 0; /* number of octets of packet saved in file */
|
||||
unsigned i = 0; /* counter */
|
||||
static uint8_t mtu[1500] = { 0 };
|
||||
static uint8_t mtu[1500] = { 0 };
|
||||
uint16_t max_data = 0;
|
||||
|
||||
mtu[0] = 0;
|
||||
@@ -204,8 +204,8 @@ static void snap_received_packet(
|
||||
mtu[29] = LO_BYTE(mstp_port->DataLength);
|
||||
mtu[30] = mstp_port->HeaderCRCActual;
|
||||
mtu_len = 31;
|
||||
if (mstp_port->DataLength) {
|
||||
max_data = min(mstp_port->InputBufferSize,mstp_port->DataLength);
|
||||
if (mstp_port->DataLength) {
|
||||
max_data = min(mstp_port->InputBufferSize, mstp_port->DataLength);
|
||||
for (i = 0; i < max_data; i++) {
|
||||
mtu[31 + i] = mstp_port->InputBuffer[i];
|
||||
}
|
||||
|
||||
@@ -217,8 +217,8 @@ static void write_received_packet(
|
||||
fwrite(header, sizeof(header), 1, pFile);
|
||||
if (mstp_port->DataLength) {
|
||||
fwrite(mstp_port->InputBuffer, max_data, 1, pFile);
|
||||
fwrite((char *)&(mstp_port->DataCRCActualMSB), 1, 1, pFile);
|
||||
fwrite((char *)&(mstp_port->DataCRCActualLSB), 1, 1, pFile);
|
||||
fwrite((char *) &(mstp_port->DataCRCActualMSB), 1, 1, pFile);
|
||||
fwrite((char *) &(mstp_port->DataCRCActualLSB), 1, 1, pFile);
|
||||
}
|
||||
} else {
|
||||
fprintf(stderr, "rx_fsm: failed to open %s: %s\n", Capture_Filename,
|
||||
|
||||
Reference in New Issue
Block a user