mirror of
https://github.com/OpenEtherCATsociety/SOEM.git
synced 2026-09-26 20:47:18 +08:00
fix windows warning
avoid : error C4703: potentially uninitialized local pointer variable 'prev_adapter' used Fix #831 Change-Id: Iacc399b5d58fe95a55ca96a87ca6b37be306db26
This commit is contained in:
committed by
Hans-Erik Floryd
parent
66a0bf1c55
commit
393433c0e8
+1
-3
@@ -35,7 +35,6 @@ uint16 oshw_ntohs (uint16 network)
|
||||
*/
|
||||
ec_adaptert * oshw_find_adapters (void)
|
||||
{
|
||||
int i = 0;
|
||||
pcap_if_t *alldevs;
|
||||
pcap_if_t *d;
|
||||
ec_adaptert * adapter;
|
||||
@@ -59,7 +58,7 @@ ec_adaptert * oshw_find_adapters (void)
|
||||
* adapter.
|
||||
* Else save as pointer to return.
|
||||
*/
|
||||
if (i)
|
||||
if (prev_adapter)
|
||||
{
|
||||
prev_adapter->next = adapter;
|
||||
}
|
||||
@@ -89,7 +88,6 @@ ec_adaptert * oshw_find_adapters (void)
|
||||
adapter->desc[0] = '\0';
|
||||
}
|
||||
prev_adapter = adapter;
|
||||
i++;
|
||||
}
|
||||
/* free all devices allocated */
|
||||
pcap_freealldevs(alldevs);
|
||||
|
||||
Reference in New Issue
Block a user