diff --git a/guestfs-inspectd.c b/guestfs-inspectd.c index cf446d7..b338268 100644 --- a/guestfs-inspectd.c +++ b/guestfs-inspectd.c @@ -89,7 +89,7 @@ static void *worker_task(zsock_t *pipe, char *disk_path) { zsock_signal(pipe, 0); while (true) { zmsg_t *message = zmsg_recv(pipe); - if (message == NULL) { + if (!message) { break; } // Process message @@ -97,10 +97,8 @@ static void *worker_task(zsock_t *pipe, char *disk_path) { // do something here // Sending reply - zmsg_t *reply = zmsg_new(); - zmsg_addstr(reply, "Reply from worker"); - zmsg_send(&reply, pipe); - zmsg_destroy(&message); + zmsg_send(&msg, pipe); + zmsg_destory(&msg); } /*if (guestfs_is_file_opts(g, file_path, GUESTFS_IS_FILE_OPTS_FOLLOWSYMLINKS, 1, -1) > 0) { printf("--- %s ---\n", file_path);