diff options
author | Brian Behlendorf <[email protected]> | 2015-05-13 10:50:35 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2015-05-14 11:09:47 -0700 |
commit | fd0fd6467bb8638b1496ad5a63b74f19fbd607df (patch) | |
tree | d546b494815a43627d4c20b987dca48c0fab031e | |
parent | 5dc8b7365ff1932bfd969bc71cd49db9b3a6dc87 (diff) |
Remove unused 'dsl_pool_t *dp' variable
When ASSERTs are compiled out by using the --disable-debug configure
option. Then the local variable 'dsl_pool_t *dp' will be unused and
generate a compiler warning. Since this variable is only used once
in the ASSERT replace it with 'ds->ds_dir->dd_pool'.
This has the additional advantage of potentially saving a few bytes
on the stack depending on how gcc decides to compile the function.
This issue was not noticed immediately because the automated builders
use --enable-debug to make the testing as rigorous as possible.
Signed-off-by: Brian Behlendorf <[email protected]>
Signed-off-by: Chris Dunlap <[email protected]>
Closes #3410
-rw-r--r-- | module/zfs/dmu_send.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/module/zfs/dmu_send.c b/module/zfs/dmu_send.c index 7fd29c68d..dddc8094f 100644 --- a/module/zfs/dmu_send.c +++ b/module/zfs/dmu_send.c @@ -875,9 +875,8 @@ dmu_send_estimate(dsl_dataset_t *ds, dsl_dataset_t *fromds, uint64_t *sizep) { int err; uint64_t size; - ASSERTV(dsl_pool_t *dp = ds->ds_dir->dd_pool); - ASSERT(dsl_pool_config_held(dp)); + ASSERT(dsl_pool_config_held(ds->ds_dir->dd_pool)); /* tosnap must be a snapshot */ if (!ds->ds_is_snapshot) @@ -930,11 +929,10 @@ int dmu_send_estimate_from_txg(dsl_dataset_t *ds, uint64_t from_txg, uint64_t *sizep) { - dsl_pool_t *dp = ds->ds_dir->dd_pool; int err; uint64_t size = 0; - ASSERT(dsl_pool_config_held(dp)); + ASSERT(dsl_pool_config_held(ds->ds_dir->dd_pool)); /* tosnap must be a snapshot */ if (!dsl_dataset_is_snapshot(ds)) |