lkml.org 
[lkml]   [2007]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
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/
\
 
 \ /
  Last update: 2007-02-21 12:13    [W:0.027 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site