]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
http sender: Kill pointless macro.
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 25 May 2025 17:18:42 +0000 (19:18 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Mon, 26 May 2025 15:45:53 +0000 (17:45 +0200)
The code is shorter and easier to read without the macro.

http_send.c

index faf2cfad8f3a07578264945dfc435f3e54c0804c..c021dfa1790e823a317aa64ca93cee8a29b0ea3b 100644 (file)
@@ -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)