rpdfs: Fix initialization in rpdfs_btree_lookup_cb()
PATCH 1/1 rpdfs: Fix initialization in rpdfs_btree_lookup_cb()
Correctly initialize the rpdfs_btree_item_args in rpdfs_btree_lookup_cb(). The code was initializing b twice and c not at all.
Fix a typo.
Signed-off-by Chris Kirby <[email protected]>
--- fs/rpdfs/btree.c | 2 +- fs/rpdfs/btree_txn.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
fs/rpdfs/btree.c +1 -1
@@ -694,7 +694,7 @@ int rpdfs_btree_lookup_cb(struct rpdfs_fs_info *rfi, struct rpdfs_btree_block *b ind =find_key_ind (bt, key);init_bti (&a, bt, ind);init_bti (&b, bt, ind +1 ); -init_bti (&b, bt, ind +2 ); +init_bti (&c, bt, ind +2 );return item_cb (rfi, &a, &b, &c, cb_arg); }
fs/rpdfs/btree_txn.c +1 -1
@@ -460,7 +460,7 @@ int rpdfs_btree_txn_prepare_lookup(struct rpdfs_fs_info *rfi, struct rpdfs_trans* transaction. * * The caller's key can land after the last item in a leaf block so we -* won't copy any items even though there are more item in the tree. If +* won't copy any items even though there are more items in the tree. If * this happens we'll advance the search key past the end of the first * leaf and try again, but only once. */
Signature · 1 line
2.51.1
Zach Brown
AppliedQuoted 3 lines · Chris Kirby
Correctly initialize the
rpdfs_btree_item_argsinrpdfs_btree_lookup_cb(). The code was initializing b twice and c not at all.
Applied, thanks!
- z