diff mbox

Cleanup dead code

Message ID y2kfdaac4d51004090327z2db0c37rde6d72a93edcb03a@mail.gmail.com
State New
Headers show

Commit Message

Jun Koi April 9, 2010, 10:27 a.m. UTC
This patch removes some dead code in exec.c

Signed-off-by: Jun Koi <junkoi2004@gmail.com>

Comments

Blue Swirl April 11, 2010, 8:25 p.m. UTC | #1
Thanks, applied.

On 4/9/10, Jun Koi <junkoi2004@gmail.com> wrote:
> This patch removes some dead code in exec.c
>
>  Signed-off-by: Jun Koi <junkoi2004@gmail.com>
>
>  diff --git a/exec.c b/exec.c
>  index 76163aa..43366ac 100644
>  --- a/exec.c
>  +++ b/exec.c
>  @@ -2884,15 +2884,12 @@ void *qemu_get_ram_ptr(ram_addr_t addr)
>     (typically a TLB entry) back to a ram offset.  */
>   ram_addr_t qemu_ram_addr_from_host(void *ptr)
>   {
>  -    RAMBlock *prev;
>      RAMBlock *block;
>      uint8_t *host = ptr;
>
>  -    prev = NULL;
>      block = ram_blocks;
>      while (block && (block->host > host
>                       || block->host + block->length <= host)) {
>  -        prev = block;
>          block = block->next;
>      }
>      if (!block) {
>
>
>
diff mbox

Patch

diff --git a/exec.c b/exec.c
index 76163aa..43366ac 100644
--- a/exec.c
+++ b/exec.c
@@ -2884,15 +2884,12 @@  void *qemu_get_ram_ptr(ram_addr_t addr)
    (typically a TLB entry) back to a ram offset.  */
 ram_addr_t qemu_ram_addr_from_host(void *ptr)
 {
-    RAMBlock *prev;
     RAMBlock *block;
     uint8_t *host = ptr;

-    prev = NULL;
     block = ram_blocks;
     while (block && (block->host > host
                      || block->host + block->length <= host)) {
-        prev = block;
         block = block->next;
     }
     if (!block) {