* Additionally, it’s even useful sometimes :-).
*
*/
+#include "libi3.h"
+
#include <stdio.h>
#include <stdbool.h>
#include <sys/types.h>
#include <xcb/xcb.h>
#include <xcb/xcb_aux.h>
-#include "libi3.h"
#include <i3/ipc.h>
static char *socket_path;
}
if (!payload)
- payload = "";
+ payload = sstrdup("");
int sockfd = socket(AF_LOCAL, SOCK_STREAM, 0);
if (sockfd == -1)
if (ipc_send_message(sockfd, strlen(payload), message_type, (uint8_t *)payload) == -1)
err(EXIT_FAILURE, "IPC: write()");
+ free(payload);
if (quiet)
return 0;