summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--idle.c6
1 files 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;
}