From ff9c276c144bc24c70f1d5b531a8fd412c34c3d9 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Fri, 13 Oct 2023 12:17:45 +0000 Subject: Improved logging system Signed-off-by: Laurent Bercot --- src/libtipidee/tipidee_response_status.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/libtipidee/tipidee_response_status.c') diff --git a/src/libtipidee/tipidee_response_status.c b/src/libtipidee/tipidee_response_status.c index aedec39..4315f61 100644 --- a/src/libtipidee/tipidee_response_status.c +++ b/src/libtipidee/tipidee_response_status.c @@ -14,13 +14,8 @@ size_t tipidee_response_status (buffer *b, tipidee_rql const *rql, unsigned int n += buffer_putnoflush(b, ".", 1) ; n += buffer_putnoflush(b, fmt, uint_fmt(fmt, rql->http_major ? rql->http_minor : 1)) ; n += buffer_putnoflush(b, " ", 1) ; - if (status) - { - char fmt[UINT_FMT] ; - size_t m = uint_fmt(fmt, status) ; - n += buffer_putnoflush(b, fmt, m) ; - n += buffer_putnoflush(b, " ", 1) ; - } + n += buffer_putnoflush(b, fmt, uint_fmt(fmt, status)) ; + n += buffer_putnoflush(b, " ", 1) ; n += buffer_putsnoflush(b, line) ; n += buffer_putnoflush(b, "\r\n", 2) ; return n ; -- cgit v1.3.1