More dead stores removal in subr_hibernate.c
authormlarkin <mlarkin@openbsd.org>
Sun, 20 Apr 2014 14:02:57 +0000 (14:02 +0000)
committermlarkin <mlarkin@openbsd.org>
Sun, 20 Apr 2014 14:02:57 +0000 (14:02 +0000)
sys/kern/subr_hibernate.c

index 6a79174..025194d 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: subr_hibernate.c,v 1.87 2014/04/19 16:19:07 mlarkin Exp $     */
+/*     $OpenBSD: subr_hibernate.c,v 1.88 2014/04/20 14:02:57 mlarkin Exp $     */
 
 /*
  * Copyright (c) 2011 Ariane van der Steldt <ariane@stack.nl>
@@ -1748,7 +1748,6 @@ hibernate_read_chunks(union hibernate_info *hib, paddr_t pig_start,
         * Prepare the final output chunk list. Calculate an output
         * inflate strategy for overlapping chunks if needed.
         */
-       img_index = pig_start;
        for (i = 0; i < nochunks ; i++) {
                /*
                 * If a conflict is detected, consume enough compressed
@@ -1765,7 +1764,6 @@ hibernate_read_chunks(union hibernate_info *hib, paddr_t pig_start,
                                npchunks++;
                                copy_start +=
                                    chunks[ochunks[j]].compressed_size;
-                               img_index += chunks[ochunks[j]].compressed_size;
                                i++;
                                j++;
                        }
@@ -1787,15 +1785,9 @@ hibernate_read_chunks(union hibernate_info *hib, paddr_t pig_start,
                                    HIBERNATE_CHUNK_USED;
                                nfchunks++;
                        }
-                       img_index += chunks[ochunks[i]].compressed_size;
                }
        }
 
-       img_index = pig_start;
-       for (i = 0; i < nfchunks; i++) {
-               img_index += chunks[fchunks[i]].compressed_size;
-       }
-
        img_cur = pig_start;
 
        for (i = 0; i < nfchunks; i++) {