diff options
author | Phil Jones <philj56@gmail.com> | 2021-11-15 19:37:48 +0000 |
---|---|---|
committer | Phil Jones <philj56@gmail.com> | 2021-11-15 19:37:48 +0000 |
commit | 49c7405b6a88e56bb69e12189adb719927343e07 (patch) | |
tree | 72c7691e746563cc1396c5b555659c813572c12e /src/ipc.c | |
parent | 108df42e561b7e81ba09a8c278a562129e651bb6 (diff) |
Multiple smaller changes.
- Remove the background image and libpng dependency
- Add a prompt
- Add xmalloc with out-of-memory handling
- Add beginnings of a rofi-like run cache
Diffstat (limited to 'src/ipc.c')
-rw-r--r-- | src/ipc.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -9,6 +9,7 @@ #include <unistd.h> #include "ipc.h" #include "log.h" +#include "xmalloc.h" static int ipc_open(void); static int ipc_send(int socket, struct json_object *request); @@ -99,7 +100,7 @@ struct json_object *ipc_receive(int sock) return NULL; } - char *buf = malloc(len + 1); + char *buf = xmalloc(len + 1); if (recv(sock, buf, len, 0) != len) { log_error("Error receiving response: %s\n", strerror(errno)); free(buf); |