diff options
author | m0gg | 2006-11-24 17:28:07 +0000 |
---|---|---|
committer | m0gg | 2006-11-24 17:28:07 +0000 |
commit | 01aaebca2e4b8b2d13aef5cdeda9b8874efe1c31 (patch) | |
tree | d815b632fdec3dd019941bd1fabcb8f963e647d0 /nanohttp/nanohttp-common.c | |
parent | 72ef19103fdf8ac5b0645e7eddc747420cc2aa8e (diff) | |
download | csoap-01aaebca2e4b8b2d13aef5cdeda9b8874efe1c31.tar.gz csoap-01aaebca2e4b8b2d13aef5cdeda9b8874efe1c31.tar.bz2 |
Documentation enhancements
Diffstat (limited to 'nanohttp/nanohttp-common.c')
-rw-r--r-- | nanohttp/nanohttp-common.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/nanohttp/nanohttp-common.c b/nanohttp/nanohttp-common.c index ebba360..5e13755 100644 --- a/nanohttp/nanohttp-common.c +++ b/nanohttp/nanohttp-common.c @@ -1,5 +1,5 @@ /****************************************************************** -* $Id: nanohttp-common.c,v 1.31 2006/11/19 09:40:14 m0gg Exp $ +* $Id: nanohttp-common.c,v 1.32 2006/11/24 17:28:07 m0gg Exp $ * * CSOAP Project: A http client/server library in C * Copyright (C) 2003 Ferhat Ayaz @@ -151,7 +151,11 @@ hpairnode_new(const char *key, const char *value, hpair_t * next) hpair_t *pair; log_verbose3("new pair ('%s','%s')", SAVE_STR(key), SAVE_STR(value)); - pair = (hpair_t *) malloc(sizeof(hpair_t)); + if (!(pair = (hpair_t *) malloc(sizeof(hpair_t)))) + { + log_error2("malloc failed (%s)", strerror(errno)); + return NULL; + } if (key != NULL) { @@ -254,6 +258,8 @@ hpairnode_dump(hpair_t * pair) } log_verbose5("(%p)['%s','%s','%p']", pair, SAVE_STR(pair->key), SAVE_STR(pair->value), pair->next); + + return; } @@ -272,6 +278,8 @@ hpairnode_dump_deep(hpair_t * pair) } log_verbose1("-- END dump hpairnode_t --\n"); + + return; } @@ -285,6 +293,8 @@ hpairnode_free(hpair_t * pair) free(pair->value); free(pair); + + return; } @@ -299,6 +309,8 @@ hpairnode_free_deep(hpair_t * pair) hpairnode_free(pair); pair = tmp; } + + return; } char * |