Skip to contentSkip to conversation

remove NULL check after qemu malloc

PATCH Applied Glauber Costa 2 participants 2 messages Jul 24, 2009 – Jul 29, 2009 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 remove NULL check after qemu malloc

it is not needed.

---
 qemu-kvm.c |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)
qemu-kvm.c +1 -7
index 5e7dc0a..b15d5d6 100644
@@ -2356,13 +2356,7 @@ int kvm_physical_memory_set_dirty_tracking(int enable)
         if (!kvm_dirty_bitmap) {
             unsigned bitmap_size = BITMAP_SIZE(phys_ram_size);
             kvm_dirty_bitmap = qemu_malloc(bitmap_size);
-            if (kvm_dirty_bitmap == NULL) {
-                perror("Failed to allocate dirty pages bitmap");
-                r=-1;
-            }
-            else {
-                r = kvm_dirty_pages_log_enable_all(kvm_context);
-            }
+            r = kvm_dirty_pages_log_enable_all(kvm_context);
         }
     }
     else {
Signature · 1 line
1.6.2.2
Applied
#1 lore raw
Quoted 2 lines · Glauber Costa

it is not needed.

Applied, thanks.

Signature · 1 line
error compiling committee.c: too many arguments to function