aboutsummaryrefslogtreecommitdiff
path: root/core/malloc.c
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2014-10-16 18:05:08 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2014-10-17 11:55:16 +1100
commita8d479c63a4bbc99808a37f6958b3de517569918 (patch)
tree7729b87473edac0ec6a3576a1211a0b87c25446d /core/malloc.c
parent78237cccad984a0d757e578ec2a9745de4fcfd87 (diff)
downloadskiboot-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.c2
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);