W32: adapt the code to GNUNET_memcpy() that returns nothing
authorРуслан Ижбулатов <lrn1986@gmail.com>
Sat, 25 Feb 2017 12:43:25 +0000 (12:43 +0000)
committerРуслан Ижбулатов <lrn1986@gmail.com>
Sat, 25 Feb 2017 21:01:47 +0000 (21:01 +0000)
src/util/win.c

index 7cd7e0f3cbf97f4592b18809138af96eda298ee0..97877b0cacad2d84654eb9910193295e5b3c6adb 100644 (file)
@@ -534,10 +534,9 @@ EnumNICs3 (struct EnumNICs3_results **results, int *results_count)
           for (i = 0; !found && i < interfaces4_len / sizeof (INTERFACE_INFO); i++)
           {
             struct sockaddr_in *m = (struct sockaddr_in *) &r->mask;
-            if (GNUNET_memcpy (&interfaces4[i].iiAddress.Address,
+            GNUNET_memcpy (&interfaces4[i].iiAddress.Address,
                 unicast->Address.lpSockaddr,
-                unicast->Address.iSockaddrLength) != 0)
-              continue;
+                unicast->Address.iSockaddrLength);
             found = 1;
             GNUNET_memcpy (&r->address, &interfaces4[i].iiAddress.Address,
                 sizeof (struct sockaddr_in));
@@ -557,10 +556,9 @@ EnumNICs3 (struct EnumNICs3_results **results, int *results_count)
               interfaces6 != NULL && !found && i < interfaces6->iAddressCount;
               i++)
           {
-            if (GNUNET_memcpy (interfaces6->Address[i].lpSockaddr,
+            GNUNET_memcpy (interfaces6->Address[i].lpSockaddr,
                 unicast->Address.lpSockaddr,
-                unicast->Address.iSockaddrLength) != 0)
-              continue;
+                unicast->Address.iSockaddrLength);
             found = 1;
             GNUNET_memcpy (&r->address, interfaces6->Address[i].lpSockaddr,
                 sizeof (struct sockaddr_in6));