git: sbin/hammer: Cleanup AssertOnFailure assertions on blockmap lookup
Tomohiro Kusumi
tkusumi at crater.dragonflybsd.org
Tue Jul 21 08:31:52 PDT 2015
commit 96755dea4347651ee885d03a6b141f3fcbb57558
Author: Tomohiro Kusumi <kusumi.tomohiro at gmail.com>
Date: Sun Jul 19 19:40:16 2015 +0900
sbin/hammer: Cleanup AssertOnFailure assertions on blockmap lookup
- Since now that blockmap_lookup() has an unique 'error' value
for each error, the function can assert-0 at the end of the
function with the 'error' value when AssertOnFailure is set.
- This makes code clearer as the function doesn't have to have
two types of error check (assert-cond or goto-done-if-not-cond)
for 9 different error cases.
Summary of changes:
sbin/hammer/blockmap.c | 87 +++++++++++++++++++-------------------------------
1 file changed, 33 insertions(+), 54 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/96755dea4347651ee885d03a6b141f3fcbb57558
--
DragonFly BSD source repository
More information about the Commits
mailing list