Hi

Wrong function attribute in the realloc definition. (1,2) would have meant that 
size = ptr * size, which doesn't make any sense.

- Lauri
>From 560c134ad765abd1201b1a1c287e7e8630ca945f Mon Sep 17 00:00:00 2001
From: Lauri Kasanen <[email protected]>
Date: Thu, 10 May 2012 19:14:13 +0300
Subject: [PATCH] memory: realloc had wrong size hint


Signed-off-by: Lauri Kasanen <[email protected]>
---
 src/mk_memory.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mk_memory.c b/src/mk_memory.c
index 11df452..967c26b 100644
--- a/src/mk_memory.c
+++ b/src/mk_memory.c
@@ -57,7 +57,7 @@ void *mk_mem_malloc_z(const size_t size)
     return buf;
 }
 
-inline ALLOCSZ_ATTR(1,2)
+inline ALLOCSZ_ATTR(2)
 void *mk_mem_realloc(void *ptr, const size_t size)
 {
     void *aux = realloc(ptr, size);
-- 
1.7.2.1

_______________________________________________
Monkey mailing list
[email protected]
http://lists.monkey-project.com/listinfo/monkey

Reply via email to