Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix windows warning #831

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions oshw/win32/oshw.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,11 @@ uint16 oshw_ntohs (uint16 network)
*/
ec_adaptert * oshw_find_adapters (void)
{
int i = 0;
int ret = 0;
pcap_if_t *alldevs;
pcap_if_t *d;
ec_adaptert * adapter;
ec_adaptert * prev_adapter;
ec_adaptert * prev_adapter = NULL;
ec_adaptert * ret_adapter = NULL;
char errbuf[PCAP_ERRBUF_SIZE];

Expand All @@ -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;
}
Expand Down Expand Up @@ -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);
Expand Down
Loading