From 2bb49deeb0601f87112a0abbfaff0dc1e11fce81 Mon Sep 17 00:00:00 2001 From: Marvin Scholz Date: Wed, 17 Oct 2018 11:49:55 +0200 Subject: [PATCH] Fix: Add missing log message arguments Found with lgtm.com --- src/client.c | 16 ++++++++-------- src/event_exec.c | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/client.c b/src/client.c index e7e1bd51..b6bd149a 100644 --- a/src/client.c +++ b/src/client.c @@ -859,10 +859,10 @@ client_slurp_result_t client_body_skip(client_t *client) char buf[2048]; int ret; - ICECAST_LOG_DEBUG("Slurping client %p"); + ICECAST_LOG_DEBUG("Slurping client %p", client); if (!client) { - ICECAST_LOG_DEBUG("Slurping client %p ... failed"); + ICECAST_LOG_DEBUG("Slurping client %p ... failed", client); return CLIENT_SLURP_ERROR; } @@ -870,7 +870,7 @@ client_slurp_result_t client_body_skip(client_t *client) size_t left = (size_t)client->request_body_length - client->request_body_read; if (!left) { - ICECAST_LOG_DEBUG("Slurping client %p ... was a success"); + ICECAST_LOG_DEBUG("Slurping client %p ... was a success", client); return CLIENT_SLURP_SUCCESS; } @@ -880,10 +880,10 @@ client_slurp_result_t client_body_skip(client_t *client) client_body_read(client, buf, left); if ((size_t)client->request_body_length == client->request_body_read) { - ICECAST_LOG_DEBUG("Slurping client %p ... was a success"); + ICECAST_LOG_DEBUG("Slurping client %p ... was a success", client); return CLIENT_SLURP_SUCCESS; } else { - ICECAST_LOG_DEBUG("Slurping client %p ... needs more data"); + ICECAST_LOG_DEBUG("Slurping client %p ... needs more data", client); return CLIENT_SLURP_NEEDS_MORE_DATA; } } else { @@ -893,15 +893,15 @@ client_slurp_result_t client_body_skip(client_t *client) ret = client_body_eof(client); switch (ret) { case 0: - ICECAST_LOG_DEBUG("Slurping client %p ... needs more data"); + ICECAST_LOG_DEBUG("Slurping client %p ... needs more data", client); return CLIENT_SLURP_NEEDS_MORE_DATA; break; case 1: - ICECAST_LOG_DEBUG("Slurping client %p ... was a success"); + ICECAST_LOG_DEBUG("Slurping client %p ... was a success", client); return CLIENT_SLURP_SUCCESS; break; default: - ICECAST_LOG_DEBUG("Slurping client %p ... failed"); + ICECAST_LOG_DEBUG("Slurping client %p ... failed", client); return CLIENT_SLURP_ERROR; break; } diff --git a/src/event_exec.c b/src/event_exec.c index 43da2568..922d547c 100644 --- a/src/event_exec.c +++ b/src/event_exec.c @@ -73,7 +73,7 @@ static inline event_exec_argvtype_t __str2argvtype(const char *str) { } else if (strcmp(str, "legacy") == 0) { return ARGVTYPE_LEGACY; } else { - ICECAST_LOG_ERROR("Unknown argument type %s, using \"default\""); + ICECAST_LOG_ERROR("Unknown argument type %s, using \"default\"", str); return ARGVTYPE_DFAULT; } }