1
0
mirror of https://github.com/simh/simh.git synced 2026-01-25 19:56:25 +00:00

Compiler suggested cleanup

This commit is contained in:
Mark Pizzolato
2012-12-15 07:56:42 -08:00
parent c046a29cba
commit 0450a9b430
7 changed files with 60 additions and 71 deletions

View File

@@ -528,6 +528,7 @@ void eth_packet_trace_ex(ETH_DEV* dev, const uint8 *msg, int len, char* txt, int
int i, same, group, sidx, oidx;
char outbuf[80], strbuf[18];
static char hex[] = "0123456789ABCDEF";
for (i=same=0; i<len; i += 16) {
if ((i > 0) && (0 == memcmp(&msg[i], &msg[i-16], 16))) {
++same;
@@ -551,8 +552,9 @@ void eth_packet_trace_ex(ETH_DEV* dev, const uint8 *msg, int len, char* txt, int
strbuf[sidx] = '\0';
sim_debug(reason, dev->dptr, "%04X%-48s %s\n", i, outbuf, strbuf);
}
if (same > 0)
if (same > 0) {
sim_debug(reason, dev->dptr, "%04X thru %04X same as above\n", i-(16*same), len-1);
}
}
}
}
@@ -666,6 +668,7 @@ void eth_zero(ETH_DEV* dev)
static ETH_DEV **eth_open_devices = NULL;
static int eth_open_device_count = 0;
#if defined (USE_NETWORK) || defined (USE_SHARED)
static void _eth_add_to_open_list (ETH_DEV* dev)
{
eth_open_devices = realloc(eth_open_devices, (eth_open_device_count+1)*sizeof(*eth_open_devices));
@@ -684,6 +687,7 @@ for (i=0; i<eth_open_device_count; ++i)
break;
}
}
#endif
t_stat eth_show (FILE* st, UNIT* uptr, int32 val, void* desc)
{