HAMMER 61H/Many: Stabilization
authorMatthew Dillon <dillon@dragonflybsd.org>
Tue, 15 Jul 2008 22:13:16 +0000 (22:13 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Tue, 15 Jul 2008 22:13:16 +0000 (22:13 +0000)
* Fix a nasty uninitialized variable in hammer_btree_iterate_reverse().

Submitted-by: Johannes Hofmann <hofmann@blob.baaderstrasse.com>
sys/vfs/hammer/hammer_btree.c

index 400765b..2392eba 100644 (file)
@@ -31,7 +31,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * 
- * $DragonFly: src/sys/vfs/hammer/hammer_btree.c,v 1.72 2008/07/15 18:01:58 dillon Exp $
+ * $DragonFly: src/sys/vfs/hammer/hammer_btree.c,v 1.73 2008/07/15 22:13:16 dillon Exp $
  */
 
 /*
@@ -375,7 +375,7 @@ hammer_btree_iterate_reverse(hammer_cursor_t cursor)
 {
        hammer_node_ondisk_t node;
        hammer_btree_elm_t elm;
-       int error;
+       int error = 0;
        int r;
        int s;
 
@@ -502,6 +502,7 @@ hammer_btree_iterate_reverse(hammer_cursor_t cursor)
                                        --cursor->index;
                                        continue;
                                }
+                               error = 0;
                                break;
                        default:
                                error = EINVAL;