Whamcloud - gitweb
libext2fs: remove pointless indirection in rbtree bitmaps
authorTheodore Ts'o <tytso@mit.edu>
Sat, 6 Oct 2012 00:57:49 +0000 (20:57 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 11 Oct 2012 10:30:34 +0000 (06:30 -0400)
commit0bcba36f3f90488d2ef7502bd3c4f4920f2c4251
tree35329f9bb8308e23e76e01d90fd1bc2e223ae66f
parent547a59a821df1cffcd0ca2c763be9ef319cb980b
libext2fs: remove pointless indirection in rbtree bitmaps

The code was previously allocating a single 4 or 8 byte pointer for
the rcursor and wcursor fields in the ext2fs_rb_private structure;
this added two extra memory allocations (which could fail), and extra
indirections, for no good reason.  Removing the extra indirection also
makes the code more readable, so it's all upside and no downside.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
lib/ext2fs/blkmap64_rb.c