diff options
author | Markus Teich <teichm@fs.tum.de> | 2016-10-09 11:38:55 +0000 |
---|---|---|
committer | Markus Teich <teichm@fs.tum.de> | 2016-10-09 11:38:55 +0000 |
commit | c9f2b5e884cac0605dd9f2931c7154fb94baeb84 (patch) | |
tree | 12b2022547c3ec117cc742e5fd1e0d7cf53806cd /src | |
parent | cb0b94bf09c45e690591140d4422b69e1db412cb (diff) | |
download | gnunet-c9f2b5e884cac0605dd9f2931c7154fb94baeb84.tar.gz gnunet-c9f2b5e884cac0605dd9f2931c7154fb94baeb84.zip |
libgnunetutil: fix doc and indentation for realloc
Diffstat (limited to 'src')
-rw-r--r-- | src/include/gnunet_common.h | 3 | ||||
-rw-r--r-- | src/util/common_allocation.c | 7 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h index 2438b179c..dfe8effcd 100644 --- a/src/include/gnunet_common.h +++ b/src/include/gnunet_common.h | |||
@@ -854,7 +854,8 @@ GNUNET_ntoh_double (double d); | |||
854 | 854 | ||
855 | /** | 855 | /** |
856 | * @ingroup memory | 856 | * @ingroup memory |
857 | * Wrapper around realloc. Rellocates size bytes of memory. | 857 | * Wrapper around realloc. Reallocates size bytes of memory. |
858 | * The content of the intersection of the new and old size will be unchanged. | ||
858 | * | 859 | * |
859 | * @param ptr the pointer to reallocate | 860 | * @param ptr the pointer to reallocate |
860 | * @param size the number of bytes to reallocate | 861 | * @param size the number of bytes to reallocate |
diff --git a/src/util/common_allocation.c b/src/util/common_allocation.c index f0299a223..f5b683569 100644 --- a/src/util/common_allocation.c +++ b/src/util/common_allocation.c | |||
@@ -234,6 +234,7 @@ GNUNET_xmalloc_unchecked_ (size_t size, | |||
234 | /** | 234 | /** |
235 | * Reallocate memory. Checks the return value, aborts if no more | 235 | * Reallocate memory. Checks the return value, aborts if no more |
236 | * memory is available. | 236 | * memory is available. |
237 | * The content of the intersection of the new and old size will be unchanged. | ||
237 | * | 238 | * |
238 | * @param ptr the pointer to reallocate | 239 | * @param ptr the pointer to reallocate |
239 | * @param n how many bytes of memory to allocate | 240 | * @param n how many bytes of memory to allocate |
@@ -243,9 +244,9 @@ GNUNET_xmalloc_unchecked_ (size_t size, | |||
243 | */ | 244 | */ |
244 | void * | 245 | void * |
245 | GNUNET_xrealloc_ (void *ptr, | 246 | GNUNET_xrealloc_ (void *ptr, |
246 | size_t n, | 247 | size_t n, |
247 | const char *filename, | 248 | const char *filename, |
248 | int linenumber) | 249 | int linenumber) |
249 | { | 250 | { |
250 | #ifdef W32_MEM_LIMIT | 251 | #ifdef W32_MEM_LIMIT |
251 | n += sizeof (size_t); | 252 | n += sizeof (size_t); |