From 57cdef87dbc2ed1de99a39104d54808ba3f7809e Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sun, 25 May 2025 19:18:42 +0200 Subject: [PATCH] http sender: Kill pointless macro. The code is shorter and easier to read without the macro. --- http_send.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/http_send.c b/http_send.c index faf2cfad..c021dfa1 100644 --- a/http_send.c +++ b/http_send.c @@ -26,9 +26,6 @@ #include "fd.h" #include "chunk_queue.h" -/** Message sent to clients that do not send a valid get request. */ -#define HTTP_ERR_MSG "HTTP/1.0 400 Bad Request\n" - /** The possible states of a client from the server's POV. */ enum http_client_status { /** We accepted the connection on the tcp socket. */ @@ -67,7 +64,7 @@ static void http_send_ok_msg(struct sender_client *sc) static int http_send_err_msg(struct sender_client *sc) { PARA_NOTICE_LOG("sending bad request message to fd %d\n", sc->fd); - return http_send_msg(sc, HTTP_ERR_MSG); + return http_send_msg(sc, "HTTP/1.0 400 Bad Request\n"); } static void http_shutdown_clients(void) -- 2.39.5