lkml.org 
[lkml]   [2005]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] kernel: Replace kmalloc/memset with kzalloc.
Date
From

Replace kmalloc/memset by kzalloc.

Signed-off-by: Panagiotis Issaris <takis@issaris.org>

---

kernel/kexec.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)

applies-to: 7085a0d56a035f94f292df54c7fe19d822904cec
bc3653f82726b556fbb5c7958f82c5b1e99c2860
diff --git a/kernel/kexec.c b/kernel/kexec.c
index 2c95848..94df70f 100644
--- a/kernel/kexec.c
+++ b/kernel/kexec.c
@@ -104,11 +104,10 @@ static int do_kimage_alloc(struct kimage

/* Allocate a controlling structure */
result = -ENOMEM;
- image = kmalloc(sizeof(*image), GFP_KERNEL);
+ image = kzalloc(sizeof(*image), GFP_KERNEL);
if (!image)
goto out;

- memset(image, 0, sizeof(*image));
image->head = 0;
image->entry = &image->head;
image->last_entry = &image->head;
---
0.99.9.GIT
-
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: 2005-11-09 01:55    [W:0.040 / U:0.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site