]> git.sur5r.net Git - i3/i3/blobdiff - libi3/ipc_recv_message.c
Merge branch 'master' into next
[i3/i3] / libi3 / ipc_recv_message.c
index 8fd438e3455f2bf1456e1f52fdd18d442bd0aefb..cb4edd6732b956f91e24c1738b796d5263a47c97 100644 (file)
@@ -41,7 +41,6 @@ int ipc_recv_message(int sockfd, uint32_t *message_type,
         if (n == -1)
             return -1;
         if (n == 0) {
-            ELOG("IPC: received EOF instead of reply\n");
             return -2;
         }
 
@@ -54,10 +53,10 @@ int ipc_recv_message(int sockfd, uint32_t *message_type,
     }
 
     walk += strlen(I3_IPC_MAGIC);
-    *reply_length = *((uint32_t*)walk);
+    memcpy(reply_length, walk, sizeof(uint32_t));
     walk += sizeof(uint32_t);
     if (message_type != NULL)
-        *message_type = *((uint32_t*)walk);
+        memcpy(message_type, walk, sizeof(uint32_t));
 
     *reply = smalloc(*reply_length);