Remove duplicate statically allocated variable
dsl_dataset_snapshot_sync_impl() declares `static zil_header_t zero_zil __maybe_unused;`, but this is also declared globally. This wastes memory. CodeQL's cpp/local-variable-hides-global-variable check caught this. Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu> Closes #14263
This commit is contained in:
parent
aaa9a6700f
commit
56c6f293c0
|
@ -1698,7 +1698,6 @@ dsl_dataset_snapshot_sync_impl(dsl_dataset_t *ds, const char *snapname,
|
|||
dsl_dataset_phys_t *dsphys;
|
||||
uint64_t dsobj, crtxg;
|
||||
objset_t *mos = dp->dp_meta_objset;
|
||||
static zil_header_t zero_zil __maybe_unused;
|
||||
objset_t *os __maybe_unused;
|
||||
|
||||
ASSERT(RRW_WRITE_HELD(&dp->dp_config_rwlock));
|
||||
|
|
Loading…
Reference in New Issue