From 8a6946b18003fae6400a137389f0cb13d0ac4bd6 Mon Sep 17 00:00:00 2001 From: m0gg Date: Sat, 3 Nov 2007 22:40:09 +0000 Subject: Split nanoHTTP and cSOAP logging --- nanohttp/nanohttp-error.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'nanohttp/nanohttp-error.c') diff --git a/nanohttp/nanohttp-error.c b/nanohttp/nanohttp-error.c index a556af8..d2f48d7 100644 --- a/nanohttp/nanohttp-error.c +++ b/nanohttp/nanohttp-error.c @@ -1,5 +1,6 @@ +/** @file nanohttp-error.c Error handling */ /****************************************************************** -* $Id: nanohttp-error.c,v 1.1 2006/12/09 09:36:57 m0gg Exp $ +* $Id: nanohttp-error.c,v 1.2 2007/11/03 22:40:11 m0gg Exp $ * * CSOAP Project: A http client/server library in C * Copyright (C) 2003 Ferhat Ayaz @@ -63,16 +64,12 @@ herror_new(const char *func, int errcode, const char *format, ...) if (!(impl = (herror_impl_t *) malloc(sizeof(herror_impl_t)))) { - log_error2("malloc failed (%s)", strerror(errno)); + log_error("malloc failed (%s)", strerror(errno)); return NULL; } impl->errcode = errcode; - - if (func) - impl->func = strdup(func); - else - func = NULL; + impl->func = func ? strdup(func) : NULL; va_start(ap, format); vsprintf(impl->message, format, ap); -- cgit v1.1-32-gdbae