It's OK to have dwNumEntries == 0 if there is no network connection

Dmitry Timoshkov dmitry at baikal.ru
Thu May 6 05:36:59 CDT 2004


Hello,

this patch fixes iphlpapi tests to pass on a not connected computer.

Changelog:
    Dmitry Timoshkov <dmitry at codeweavers.com>
    It's OK to have dwNumEntries == 0 if there is no network connection.

--- cvs/hq/wine/dlls/iphlpapi/tests/iphlpapi.c	2004-03-24 20:56:29.000000000 +0800
+++ wine/dlls/iphlpapi/tests/iphlpapi.c	2004-05-06 17:34:08.000000000 +0900
@@ -214,7 +214,7 @@ static void testGetIpAddrTable(void)
       ok(apiReturn == NO_ERROR,
        "GetIpAddrTable(buf, &dwSize, FALSE) returned %ld, expected NO_ERROR\n",
        apiReturn);
-      if (apiReturn == NO_ERROR)
+      if (apiReturn == NO_ERROR && buf->dwNumEntries)
         testGetIfEntry(buf->table[0].dwIndex);
       free(buf);
     }
@@ -272,9 +272,6 @@ static void testGetIpForwardTable(void)
       ok(apiReturn == NO_ERROR,
        "GetIpForwardTable(buf, &dwSize, FALSE) returned %ld, expected NO_ERROR\n",
        apiReturn);
-      if (apiReturn == NO_ERROR)
-        ok(buf->dwNumEntries > 0,
-          "Got 0 IP forward table entries, expect at least 1\n");
       free(buf);
     }
   }






More information about the wine-patches mailing list