------------------------------------------------------------ revno: 5366 committer: Diego Biurrun <diego@xxxxxxxxxx> branch nick: hipl timestamp: Tue 2011-01-04 17:09:56 +0100 message: Get rid of one pointless variable indirection as noticed by Stefan Götz. modified: lib/core/hashchain_store.c -- lp:hipl https://code.launchpad.net/~hipl-core/hipl/trunk Your team HIPL core team is subscribed to branch lp:hipl. To unsubscribe from this branch go to https://code.launchpad.net/~hipl-core/hipl/trunk/+edit-subscription
=== modified file 'lib/core/hashchain_store.c' --- lib/core/hashchain_store.c 2011-01-04 13:45:27 +0000 +++ lib/core/hashchain_store.c 2011-01-04 16:09:56 +0000 @@ -610,7 +610,6 @@ const unsigned char *anchor, const int use_hash_trees) { - struct hash_chain *hchain = NULL; struct hash_tree *htree = NULL; void *stored_item = NULL; int hash_length = 0, err = 0; @@ -656,18 +655,13 @@ goto out_err; } - } else { - hchain = stored_item; - - if (!memcmp(anchor, hchain_get_anchor(hchain), hash_length)) { - stored_item = hip_ll_del(&hcstore-> - hchain_shelves[function_id][hash_length_id]. - hchains[i][hierarchy_level], j, NULL); - - HIP_DEBUG("hash-chain matching the anchor found\n"); - - goto out_err; - } + } else if (!memcmp(anchor, hchain_get_anchor(stored_item), hash_length)) { + stored_item = hip_ll_del(&hcstore-> + hchain_shelves[function_id][hash_length_id]. + hchains[i][hierarchy_level], j, NULL); + + HIP_DEBUG("hash-chain matching the anchor found\n"); + goto out_err; } } }