[Libreoffice-commits] core.git: sal/osl

Stephan Bergmann sbergman at redhat.com
Mon Feb 2 03:23:06 PST 2015


 sal/osl/w32/socket.cxx |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit e76bc369b8ee58094f45a2f5451cf9374163e979
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Feb 2 12:22:32 2015 +0100

    warning C4701: potentially uninitialized local variable 'Addr' used
    
    Change-Id: I63c22fb682175edc450b1ce3b6ea78cf5a5bc2f1

diff --git a/sal/osl/w32/socket.cxx b/sal/osl/w32/socket.cxx
index a6487fa..8722142 100644
--- a/sal/osl/w32/socket.cxx
+++ b/sal/osl/w32/socket.cxx
@@ -651,10 +651,7 @@ oslSocketAddr SAL_CALL osl_createInetSocketAddr (
 #ifdef _WIN32_WINNT_WINBLUE
     IN_ADDR addr;
     INT ret = InetPtonW(AF_INET, strDottedAddr->buffer, & addr);
-    if (1 == ret)
-    {
-        Addr = addr.S_un.S_addr;
-    }
+    Addr = ret == 1 ? addr.S_un.S_addr : OSL_INADDR_NONE;
 #else
     rtl_String  *pDottedAddr=NULL;
 


More information about the Libreoffice-commits mailing list