]> git.sur5r.net Git - i3/i3/blobdiff - libi3/ipc_send_message.c
format **/*.c with clang-format-3.5
[i3/i3] / libi3 / ipc_send_message.c
index 0c360c9c5e47628e3e8becf61e96b47a2eefa7db..28cb8359207e128b648a664824b6dcc59950e07e 100644 (file)
@@ -28,10 +28,9 @@ int ipc_send_message(int sockfd, const uint32_t message_size,
                      const uint32_t message_type, const uint8_t *payload) {
     const i3_ipc_header_t header = {
         /* We don’t use I3_IPC_MAGIC because it’s a 0-terminated C string. */
-        .magic = { 'i', '3', '-', 'i', 'p', 'c' },
+        .magic = {'i', '3', '-', 'i', 'p', 'c'},
         .size = message_size,
-        .type = message_type
-    };
+        .type = message_type};
 
     size_t sent_bytes = 0;
     int n = 0;
@@ -40,7 +39,7 @@ int ipc_send_message(int sockfd, const uint32_t message_size,
      * buffers which cannot fit 14 bytes into them, so the write() will only be
      * called once. */
     while (sent_bytes < sizeof(i3_ipc_header_t)) {
-        if ((n = write(sockfd, ((void*)&header) + sent_bytes, sizeof(i3_ipc_header_t) - sent_bytes)) == -1) {
+        if ((n = write(sockfd, ((void *)&header) + sent_bytes, sizeof(i3_ipc_header_t) - sent_bytes)) == -1) {
             if (errno == EAGAIN)
                 continue;
             return -1;