[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] use qemu_malloc and friends consistently
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH] use qemu_malloc and friends consistently |
Date: |
Fri, 29 May 2009 11:38:11 +0200 |
User-agent: |
Thunderbird 2.0.0.21 (X11/20090320) |
address@hidden schrieb:
> Thanks for pointing this. I guess it just sounds strange to me that somebody
> would want to alloc 0 bytes. But why not ...
Yes, this is a corner case. Not useful, but currently allowed and
definitely shouldn't crash the process.
> I guess that if pattern_count/count is set to 0 we can just avoid the all
> processing of malloc/memset/memcmp/free anyway.
>
> Would you be ok with something like:
>
> if (Pflag && pattern_count) {
>
> instead of:
>
> if (Pflag) {
To be honest, the whole point of my mail was to provoke answers like
Anthony's and get qemu_malloc fixed. ;-)
But sure, the change you propose in qemu-io is fine and will make things
work even with current qemu_malloc.
Kevin
- Re: [Qemu-devel] [PATCH] use qemu_malloc and friends consistently, (continued)
- Re: [Qemu-devel] [PATCH] use qemu_malloc and friends consistently, Julian Seward, 2009/05/29
- Re: [Qemu-devel] [PATCH] use qemu_malloc and friends consistently, Gerd Hoffmann, 2009/05/29
- Re: [Qemu-devel] [PATCH] use qemu_malloc and friends consistently, David Turner, 2009/05/29
- Re: [Qemu-devel] [PATCH] use qemu_malloc and friends consistently, David Turner, 2009/05/29
- Re: [Qemu-devel] [PATCH] use qemu_malloc and friends consistently, Markus Armbruster, 2009/05/29
- Re: [Qemu-devel] [PATCH] use qemu_malloc and friends consistently, Gerd Hoffmann, 2009/05/29
- Re: [Qemu-devel] [PATCH] use qemu_malloc and friends consistently, malc, 2009/05/29
Re: [Qemu-devel] [PATCH] use qemu_malloc and friends consistently, jcd, 2009/05/29
- Re: [Qemu-devel] [PATCH] use qemu_malloc and friends consistently,
Kevin Wolf <=
Re: [Qemu-devel] [PATCH] use qemu_malloc and friends consistently, jcd, 2009/05/29
Re: [Qemu-devel] [PATCH] use qemu_malloc and friends consistently, jcd, 2009/05/29
Re: [Qemu-devel] [PATCH] use qemu_malloc and friends consistently, jcd, 2009/05/29
Re: [Qemu-devel] [PATCH] use qemu_malloc and friends consistently, jcd, 2009/05/29
Re: [Qemu-devel] [PATCH] use qemu_malloc and friends consistently, jcd, 2009/05/29