From 5563889b66690640ad81889e8431212b67a348c1 Mon Sep 17 00:00:00 2001 From: Emil Mikulic Date: Sat, 22 Nov 2003 13:16:13 +0000 Subject: [PATCH] Make keep_alive() a macro instead of a tiny function. --- trunk/darkhttpd.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/trunk/darkhttpd.c b/trunk/darkhttpd.c index 349c31e..4fa72a6 100644 --- a/trunk/darkhttpd.c +++ b/trunk/darkhttpd.c @@ -265,13 +265,9 @@ static const char default_mimetype[] = "application/octet-stream"; -/* --------------------------------------------------------------------------- - * Returns Connection or Keep-Alive field, depending on conn_close. - */ -static const char *keep_alive(const struct connection *conn) -{ - return (conn->conn_close ? "Connection: close\r\n" : keep_alive_field); -} +/* Connection or Keep-Alive field, depending on conn_close. */ +#define keep_alive(conn) ((conn)->conn_close ? \ + "Connection: close\r\n" : keep_alive_field)