From af6949cc43eba5b51c5f37712b13155808ad7061 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Thu, 29 Apr 2010 18:24:12 +0200 Subject: [PATCH] Apply the commit from portableproplib's git master: commit b2975842aba26df9b9885ff56b2ff182eda06152 Author: Juan RP Date: Thu Apr 29 18:23:15 2010 +0200 Remove some dead code found by the LLVM's clang static analyzer. --HG-- extra : convert_revision : xtraeme%40gmail.com-20100429162412-gq0on6wybpoaazgg --- lib/portableproplib/prop_data.c | 1 - lib/portableproplib/prop_rb.c | 3 --- 2 files changed, 4 deletions(-) diff --git a/lib/portableproplib/prop_data.c b/lib/portableproplib/prop_data.c index d4358104..da07fd2e 100644 --- a/lib/portableproplib/prop_data.c +++ b/lib/portableproplib/prop_data.c @@ -485,7 +485,6 @@ _prop_data_internalize_decode(struct _prop_object_internalize_context *ctx, /* Make sure there is another trailing = */ if (ch != _prop_data_pad64) return (false); - ch = (unsigned char) *src; /* FALLTHROUGH */ case 3: /* Valid, two bytes of info */ diff --git a/lib/portableproplib/prop_rb.c b/lib/portableproplib/prop_rb.c index 08a2c7a0..3d9f1548 100644 --- a/lib/portableproplib/prop_rb.c +++ b/lib/portableproplib/prop_rb.c @@ -327,8 +327,6 @@ rb_tree_insert_rebalance(struct rb_tree *rbt, struct rb_node *self) KASSERT(father->rb_parent == self); KASSERT(self->rb_nodes[which] == father); KASSERT(self->rb_parent == grandpa); - self = father; - father = self->rb_parent; } KASSERT(RB_RED_P(self) && RB_RED_P(father)); KASSERT(grandpa->rb_nodes[which] == father); @@ -655,7 +653,6 @@ rb_tree_removal_rebalance(struct rb_tree *rbt, struct rb_node *parent, if (RB_RED_P(brother)) { KASSERT(RB_BLACK_P(parent)); rb_tree_reparent_nodes(rbt, parent, other); - brother = parent->rb_nodes[other]; KASSERT(!RB_SENTINEL_P(brother)); KASSERT(RB_BLACK_P(brother)); KASSERT(RB_RED_P(parent));