Fix 64bit build error 22/289522/1
authorChanggyu Choi <changyu.choi@samsung.com>
Thu, 9 Mar 2023 06:25:37 +0000 (15:25 +0900)
committerChanggyu Choi <changyu.choi@samsung.com>
Thu, 9 Mar 2023 06:25:55 +0000 (15:25 +0900)
In 64bit environment, size_t may be 8bytes.

Change-Id: I1a6abfbe2eb52dfaa5165aef50ff72b1081119f2
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
src/lib/launchpad-common/client_socket.cc

index 849f4cf..ca5bbb0 100644 (file)
@@ -90,7 +90,7 @@ void ClientSocket::Connect(const std::string& endpoint) {
   }
 }
 
-int ClientSocket::Send(const void* buf, unsigned int size) {
+int ClientSocket::Send(const void* buf, size_t size) {
   const unsigned char* buffer = static_cast<const unsigned char*>(buf);
   size_t len = size;
   int retry_cnt = MAX_RETRY_CNT;
@@ -117,7 +117,7 @@ int ClientSocket::Send(const void* buf, unsigned int size) {
   return 0;
 }
 
-int ClientSocket::Receive(void* buf, unsigned int size) {
+int ClientSocket::Receive(void* buf, size_t size) {
   bool is_blocking;
   if (fcntl(fd_, F_GETFL, 0) & O_NONBLOCK)
     is_blocking = false;