Remove uninitialised bytes
authorSunwook Bae <sunwook45.bae@samsung.com>
Thu, 25 Apr 2013 05:22:04 +0000 (14:22 +0900)
committerSunwook Bae <sunwook45.bae@samsung.com>
Thu, 25 Apr 2013 05:22:04 +0000 (14:22 +0900)
Change-Id: I8d5782b00a3c8a7babbf969689ded25c2e2f5f7e
Signed-off-by: Sunwook Bae <sunwook45.bae@samsung.com>
src/io/FIo_IpcClient.cpp
src/server/io/FIo_IpcServer.cpp

index 62449ed..32843d0 100644 (file)
@@ -133,7 +133,7 @@ _IpcClient::GetName(void) const
 struct HelloMessage
 {
        int pid;
-       bool reverse;
+       int reverse;
 };
 
 result
@@ -145,14 +145,21 @@ _IpcClient::MakeConnection(bool forReverse)
        socklen_t serverLen = 0;
        int client = -1;
        int ret = 0;
-       HelloMessage helloMessage = {0, false};
+       HelloMessage helloMessage = {0, 0};
        std::string socketName;
        char* pSocketName = null;
        size_t socketNameLength = 0;
        int flags = 0;
 
        helloMessage.pid = getpid();
-       helloMessage.reverse = forReverse;
+       if (forReverse)
+       {
+               helloMessage.reverse = 1;
+       }
+       else
+       {
+               helloMessage.reverse = 0;
+       }
 
        pSocketName = _StringConverter::CopyToCharArrayN(__name);
        SysTryReturnResult(NID_IO, pSocketName != null, E_OUT_OF_MEMORY, "The memory is insufficient.");
index 220725e..91f9808 100644 (file)
@@ -279,7 +279,7 @@ CATCH:
 struct HelloMessage
 {
        int pid;
-       bool reverse;  // true if the connection is for reverse message
+       int reverse;  // if the connection is for reverse message
 };
 
 gboolean
@@ -341,7 +341,7 @@ _IpcServer::OnConnectionRequest(GIOChannel* source, GIOCondition condition, gpoi
                pIpcServer->__pCurrentClientInfo = null;
        }
 
-       if (helloMessage.reverse)
+       if (helloMessage.reverse != 0)
        {
                pClientInfo->pReverseChannel = pChannel;
        }