diff options
author | Stewart Smith <stewart@linux.vnet.ibm.com> | 2014-10-16 18:05:08 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2014-10-17 11:55:16 +1100 |
commit | a8d479c63a4bbc99808a37f6958b3de517569918 (patch) | |
tree | 7729b87473edac0ec6a3576a1211a0b87c25446d /core/malloc.c | |
parent | 78237cccad984a0d757e578ec2a9745de4fcfd87 (diff) | |
download | skiboot-a8d479c63a4bbc99808a37f6958b3de517569918.zip skiboot-a8d479c63a4bbc99808a37f6958b3de517569918.tar.gz skiboot-a8d479c63a4bbc99808a37f6958b3de517569918.tar.bz2 |
Rename mem_size() to mem_allocated_size()
This better states the intention of what it should return.
I was bit unsure when fixing mem_size(), so hopefully this
makes future me (or other people) less unsure as to the
intended return value of this function.
No functional changes, just rename.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Acked-by: Rusty Russell <rusty@au1.ibm.com>
Diffstat (limited to 'core/malloc.c')
-rw-r--r-- | core/malloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/malloc.c b/core/malloc.c index 692a501..9e715f6 100644 --- a/core/malloc.c +++ b/core/malloc.c @@ -63,7 +63,7 @@ void *__realloc(void *ptr, size_t size, const char *location) newptr = mem_alloc(&skiboot_heap, size, DEFAULT_ALIGN, location); if (newptr) { - size_t copy = mem_size(&skiboot_heap, ptr); + size_t copy = mem_allocated_size(ptr); if (copy > size) copy = size; memcpy(newptr, ptr, copy); |