aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Teich <teichm@fs.tum.de>2016-10-09 11:38:55 +0000
committerMarkus Teich <teichm@fs.tum.de>2016-10-09 11:38:55 +0000
commitc9f2b5e884cac0605dd9f2931c7154fb94baeb84 (patch)
tree12b2022547c3ec117cc742e5fd1e0d7cf53806cd
parentcb0b94bf09c45e690591140d4422b69e1db412cb (diff)
libgnunetutil: fix doc and indentation for realloc
-rw-r--r--src/include/gnunet_common.h3
-rw-r--r--src/util/common_allocation.c7
2 files changed, 6 insertions, 4 deletions
diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h
index 2438b179c1..dfe8effcd5 100644
--- a/src/include/gnunet_common.h
+++ b/src/include/gnunet_common.h
@@ -854,7 +854,8 @@ GNUNET_ntoh_double (double d);
/**
* @ingroup memory
- * Wrapper around realloc. Rellocates size bytes of memory.
+ * Wrapper around realloc. Reallocates size bytes of memory.
+ * The content of the intersection of the new and old size will be unchanged.
*
* @param ptr the pointer to reallocate
* @param size the number of bytes to reallocate
diff --git a/src/util/common_allocation.c b/src/util/common_allocation.c
index f0299a223b..f5b6835691 100644
--- a/src/util/common_allocation.c
+++ b/src/util/common_allocation.c
@@ -234,6 +234,7 @@ GNUNET_xmalloc_unchecked_ (size_t size,
/**
* Reallocate memory. Checks the return value, aborts if no more
* memory is available.
+ * The content of the intersection of the new and old size will be unchanged.
*
* @param ptr the pointer to reallocate
* @param n how many bytes of memory to allocate
@@ -243,9 +244,9 @@ GNUNET_xmalloc_unchecked_ (size_t size,
*/
void *
GNUNET_xrealloc_ (void *ptr,
- size_t n,
- const char *filename,
- int linenumber)
+ size_t n,
+ const char *filename,
+ int linenumber)
{
#ifdef W32_MEM_LIMIT
n += sizeof (size_t);