qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 7/7] migraion: delete death code


From: Gonglei (Arei)
Subject: [Qemu-devel] [PATCH 7/7] migraion: delete death code
Date: Fri, 28 Feb 2014 04:12:33 +0000

delete death code.

Signed-off-by: ChenLiang <address@hidden>
Signed-off-by: Gonglei <address@hidden>
---
 arch_init.c | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/arch_init.c b/arch_init.c
index cc88875..12fbcea 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -178,13 +178,10 @@ static inline bool is_zero_range(uint8_t *p, uint64_t 
size)
 static struct {
     /* buffer used for XBZRLE encoding */
     uint8_t *encoded_buf;
-    /* buffer for storing page content */
-    uint8_t *current_buf;
     /* Cache for XBZRLE */
     PageCache *cache;
 } XBZRLE = {
     .encoded_buf = NULL,
-    .current_buf = NULL,
     .cache = NULL,
 };
 /* buffer used for XBZRLE decoding */
@@ -659,10 +656,8 @@ static void migration_end(void)
         cache_fini(XBZRLE.cache);
         g_free(XBZRLE.cache);
         g_free(XBZRLE.encoded_buf);
-        g_free(XBZRLE.current_buf);
         XBZRLE.cache = NULL;
         XBZRLE.encoded_buf = NULL;
-        XBZRLE.current_buf = NULL;
     }
 }
 
@@ -709,14 +704,6 @@ static int ram_save_setup(QEMUFile *f, void *opaque)
             return -1;
         }
 
-        XBZRLE.current_buf = g_try_malloc(TARGET_PAGE_SIZE);
-        if (!XBZRLE.current_buf) {
-            DPRINTF("Error allocating current_buf\n");
-            g_free(XBZRLE.encoded_buf);
-            XBZRLE.encoded_buf = NULL;
-            return -1;
-        }
-
         acct_clear();
     }
 
-- 
1.7.12.4


Best regards,
-Gonglei




reply via email to

[Prev in Thread] Current Thread [Next in Thread]