From 949a8d0b46d6baa9f42c2f8c3bd5e3bdc3596cbd Mon Sep 17 00:00:00 2001 From: m0gg Date: Sun, 19 Nov 2006 09:40:14 +0000 Subject: nanohttp admin patch; code cleanup --- nanohttp/nanohttp-response.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'nanohttp/nanohttp-response.c') diff --git a/nanohttp/nanohttp-response.c b/nanohttp/nanohttp-response.c index 879fd6c..d38056d 100755 --- a/nanohttp/nanohttp-response.c +++ b/nanohttp/nanohttp-response.c @@ -1,5 +1,5 @@ /****************************************************************** -* $Id: nanohttp-response.c,v 1.11 2006/07/09 16:24:19 snowdrop Exp $ +* $Id: nanohttp-response.c,v 1.12 2006/11/19 09:40:14 m0gg Exp $ * * CSOAP Project: A http client/server library in C * Copyright (C) 2003-2004 Ferhat Ayaz @@ -37,20 +37,21 @@ #include #endif -#ifdef MEM_DEBUG -#include +#ifdef HAVE_NETINET_IN_H +#include #endif #include "nanohttp-logging.h" #include "nanohttp-common.h" +#include "nanohttp-socket.h" +#include "nanohttp-stream.h" #include "nanohttp-response.h" static hresponse_t * -hresponse_new() +hresponse_new(void) { hresponse_t *res; - /* create response object */ if (!(res = (hresponse_t *) malloc(sizeof(hresponse_t)))) { log_error2("malloc failed (%s)", strerror(errno)); @@ -64,6 +65,7 @@ hresponse_new() res->in = NULL; res->content_type = NULL; res->attachments = NULL; + return res; } -- cgit v1.1-32-gdbae