Fix gcc missing braces warnings

Resolve compiler warnings concerning missing braces.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
Brian Behlendorf
2010-08-26 09:52:41 -07:00
parent 0bc8fd7884
commit 2598c0012d
11 changed files with 80 additions and 72 deletions
+2 -1
View File
@@ -1745,13 +1745,14 @@ static void
arc_evict_ghost(arc_state_t *state, uint64_t spa, int64_t bytes)
{
arc_buf_hdr_t *ab, *ab_prev;
arc_buf_hdr_t marker = { 0 };
arc_buf_hdr_t marker;
list_t *list = &state->arcs_list[ARC_BUFC_DATA];
kmutex_t *hash_lock;
uint64_t bytes_deleted = 0;
uint64_t bufs_skipped = 0;
ASSERT(GHOST_STATE(state));
bzero(&marker, sizeof(marker));
top:
mutex_enter(&state->arcs_mtx);
for (ab = list_tail(list); ab; ab = ab_prev) {
+2 -1
View File
@@ -2923,10 +2923,11 @@ dsl_dataset_promote(const char *name, char *conflsnap)
dsl_dir_t *dd;
dsl_pool_t *dp;
dmu_object_info_t doi;
struct promotearg pa = { 0 };
struct promotearg pa;
struct promotenode *snap;
int err;
bzero(&pa, sizeof(struct promotearg));
err = dsl_dataset_hold(name, FTAG, &ds);
if (err)
return (err);
+3 -1
View File
@@ -1251,10 +1251,12 @@ static void
dsl_scan_ddt(dsl_scan_t *scn, dmu_tx_t *tx)
{
ddt_bookmark_t *ddb = &scn->scn_phys.scn_ddt_bookmark;
ddt_entry_t dde = { 0 };
ddt_entry_t dde;
int error;
uint64_t n = 0;
bzero(&dde, sizeof (ddt_entry_t));
while ((error = ddt_walk(scn->scn_dp->dp_spa, ddb, &dde)) == 0) {
ddt_t *ddt;