From 5badf2b6bf0e4717ac940966292127e01f659804 Mon Sep 17 00:00:00 2001 From: David Härdeman Date: Tue, 9 Jun 2020 11:17:49 +0200 Subject: Clarify define --- idle.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/idle.c b/idle.c index 89a8f9a..518999b 100644 --- a/idle.c +++ b/idle.c @@ -115,7 +115,7 @@ write_cmd(char **pos, const char *begin, const char *end) write_bytes(pos, begin, end - begin); } -#define JSON_NEEDLE "\"online\"" +#define ONLINE_NEEDLE "\"online\"" static void idle_check_handshake_reply(struct cfg *cfg, struct uring_task *task, int res) { @@ -198,7 +198,7 @@ idle_check_handshake_reply(struct cfg *cfg, struct uring_task *task, int res) char *end; unsigned count; - online = memmem(pos, remain, JSON_NEEDLE, strlen(JSON_NEEDLE)); + online = memmem(pos, remain, ONLINE_NEEDLE, strlen(ONLINE_NEEDLE)); if (!online) { fprintf(stderr, "Could not find online count in JSON\n"); goto error; @@ -213,7 +213,7 @@ idle_check_handshake_reply(struct cfg *cfg, struct uring_task *task, int res) } *end = '\0'; - if (sscanf(online, JSON_NEEDLE " : %u", &count) != 1) { + if (sscanf(online, ONLINE_NEEDLE " : %u", &count) != 1) { fprintf(stderr, "Could not parse JSON (online count)\n"); goto error; } -- cgit v1.2.3