netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 7/8 v2] textsearch: convert kmalloc + memset to kzalloc
@ 2008-06-25 10:25 Joonwoo Park
  2008-06-25 11:04 ` Patrick McHardy
  0 siblings, 1 reply; 2+ messages in thread
From: Joonwoo Park @ 2008-06-25 10:25 UTC (permalink / raw)
  To: Patrick McHardy
  Cc: netdev, netfilter-devel, Thomas Graf, Pablo Neira Ayuso,
	Joonwoo Park

convert kmalloc + memset to kzalloc for alloc_ts_config

Signed-off-by: Joonwoo Park <joonwpark81@gmail.com>
---
 include/linux/textsearch.h |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/include/linux/textsearch.h b/include/linux/textsearch.h
index 6c34cf2..d9a85d6 100644
--- a/include/linux/textsearch.h
+++ b/include/linux/textsearch.h
@@ -162,11 +162,10 @@ static inline struct ts_config *alloc_ts_config(size_t payload,
 {
 	struct ts_config *conf;
 
-	conf = kmalloc(TS_PRIV_ALIGN(sizeof(*conf)) + payload, gfp_mask);
+	conf = kzalloc(TS_PRIV_ALIGN(sizeof(*conf)) + payload, gfp_mask);
 	if (conf == NULL)
 		return ERR_PTR(-ENOMEM);
 
-	memset(conf, 0, TS_PRIV_ALIGN(sizeof(*conf)) + payload);
 	return conf;
 }
 
-- 
1.5.4.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-06-25 11:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-25 10:25 [PATCH 7/8 v2] textsearch: convert kmalloc + memset to kzalloc Joonwoo Park
2008-06-25 11:04 ` Patrick McHardy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).