Messages in this thread Patch in this message |  | | Date | Wed, 21 Feb 2007 13:10:44 +0200 (EET) | From | Pekka J Enberg <> | Subject | [PATCH] slab: add __must_check to krealloc |
| |
From: Pekka Enberg <penberg@cs.helsinki.fi>
As suggested by Arjan, make GCC warn about classic misuse of the realloc API.
Cc: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> --- include/linux/slab.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Index: 2.6/include/linux/slab.h =================================================================== --- 2.6.orig/include/linux/slab.h 2007-02-21 13:06:47.000000000 +0200 +++ 2.6/include/linux/slab.h 2007-02-21 13:07:06.000000000 +0200 @@ -72,7 +72,7 @@ */ void *__kmalloc(size_t, gfp_t); void *__kzalloc(size_t, gfp_t); -void *krealloc(const void *, size_t, gfp_t); +void * __must_check krealloc(const void *, size_t, gfp_t); void kfree(const void *); unsigned int ksize(const void *); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |