iphlpapi: Avoid uninitialized variable warning in build_tcp_table.
Gerald Pfeifer
gerald at pfeifer.com
Sun Aug 25 15:35:48 CDT 2013
I noticed this has now been implemented for FreeBSD -- congratulations,
Charles!
Right now this trigger a new warnings with current versions of GCC which
the patch below addresses.
Gerald
---
dlls/iphlpapi/ipstats.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/iphlpapi/ipstats.c b/dlls/iphlpapi/ipstats.c
index 962d421..3b12bc1 100644
--- a/dlls/iphlpapi/ipstats.c
+++ b/dlls/iphlpapi/ipstats.c
@@ -2221,7 +2221,10 @@ DWORD build_tcp_table( TCP_TABLE_CLASS class, void **tablep, BOOL order, HANDLE
goto done;
}
- if (class >= TCP_TABLE_OWNER_PID_LISTENER) pMap = get_pid_map( &NumEntries );
+ if (class >= TCP_TABLE_OWNER_PID_LISTENER)
+ pMap = get_pid_map( &NumEntries );
+ else
+ pMap = NULL;
/* Might be nothing here; first entry is just a header it seems */
if (Len <= sizeof (struct xinpgen)) goto done;
--
1.8.3.4
More information about the wine-patches
mailing list