From: Pavel Vasilyev <pavel@pavlinux.ru>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] PATCH: qemu_mallocz(): minus one function and replace calloc() instead malloc()
Date: Wed, 28 Jan 2009 21:44:46 +0300 [thread overview]
Message-ID: <200901282144.55730.pavel@pavlinux.ru> (raw)
In-Reply-To: <E1LSE25-0007xJ-2b@cvs.savannah.gnu.org>
[-- Attachment #1: Type: text/plain, Size: 330 bytes --]
May be this better?
--- qemu-malloc.c Base (BASE)
+++ qemu-malloc.c Locally Modified (Based On LOCAL)
@@ -46,10 +46,9 @@
void *(size_t size)
{
void *ptr;
- ptr = qemu_malloc(size);
+ ptr = calloc(1, size);
if (!ptr)
return NULL;
- memset(ptr, 0, size);
return ptr;
}
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 194 bytes --]
next prev parent reply other threads:[~2009-01-28 18:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-28 17:16 [Qemu-devel] [6466] Fix qemu_malloc malc
2009-01-28 18:44 ` Pavel Vasilyev [this message]
2009-01-28 19:33 ` [Qemu-devel] PATCH: qemu_mallocz(): minus one function and replace calloc() instead malloc() Lionel Landwerlin
2009-01-28 20:00 ` malc
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200901282144.55730.pavel@pavlinux.ru \
--to=pavel@pavlinux.ru \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).