diff options
author | Pranith Kumar K <pkarampu@redhat.com> | 2016-01-06 14:30:08 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2016-07-25 23:47:33 -0700 |
commit | d2bd17e5a53d0ffa375df1a5ad957556be2f2b83 (patch) | |
tree | 872633e25252817ee332d0b64a92cd64eba7464b /cli | |
parent | 558a45fa527b01ec81904150532a8b661c06ae8a (diff) |
dict: Don't expose get_new_dict/dict_destroy
get_new_dict/dict_destroy is causing confusion where, dict_new/dict_destroy or
get_new_dict/dict_unref are used instead of dict_new/dict_unref.
Change-Id: I4cc69f5b6711d720823395e20fd624a0c6c1168c
BUG: 1296043
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/13183
Smoke: Gluster Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
Diffstat (limited to 'cli')
-rw-r--r-- | cli/src/cli-cmd-parser.c | 44 | ||||
-rw-r--r-- | cli/src/cli-cmd-system.c | 6 | ||||
-rw-r--r-- | cli/src/cli-cmd-volume.c | 2 | ||||
-rw-r--r-- | cli/src/cli-rpc-ops.c | 4 | ||||
-rw-r--r-- | cli/src/cli.c | 2 |
5 files changed, 29 insertions, 29 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c index 77092b47591..f696ab45c55 100644 --- a/cli/src/cli-cmd-parser.c +++ b/cli/src/cli-cmd-parser.c @@ -740,7 +740,7 @@ out: if (ret) { gf_log ("cli", GF_LOG_ERROR, "Unable to parse create volume CLI"); if (dict) - dict_destroy (dict); + dict_unref (dict); } GF_FREE (trans_type); @@ -816,7 +816,7 @@ cli_cmd_volume_reset_parse (const char **words, int wordcount, dict_t **options) out: if (ret && dict) { - dict_destroy (dict); + dict_unref (dict); } return ret; @@ -978,7 +978,7 @@ cli_cmd_inode_quota_parse (const char **words, int wordcount, dict_t **options) out: if (ret < 0) { if (dict) - dict_destroy (dict); + dict_unref (dict); } return ret; @@ -1317,7 +1317,7 @@ set_type: out: if (ret < 0) { if (dict) - dict_destroy (dict); + dict_unref (dict); } return ret; @@ -1570,8 +1570,8 @@ cli_cmd_volume_set_parse (struct cli_state *state, const char **words, *options = dict; out: - if (ret) - dict_destroy (dict); + if (ret && dict) + dict_unref (dict); return ret; } @@ -1711,7 +1711,7 @@ out: if (ret) { gf_log ("cli", GF_LOG_ERROR, "Unable to parse add-brick CLI"); if (dict) - dict_destroy (dict); + dict_unref (dict); } return ret; @@ -1790,7 +1790,7 @@ out: if (ret) { gf_log ("cli", GF_LOG_ERROR, "Unable to parse tier CLI"); if (dict) - dict_destroy (dict); + dict_unref (dict); } return ret; @@ -2019,7 +2019,7 @@ out: if (ret) { gf_log ("cli", GF_LOG_ERROR, "Unable to parse remove-brick CLI"); if (dict) - dict_destroy (dict); + dict_unref (dict); } GF_FREE (tmp_brick); @@ -2112,7 +2112,7 @@ out: if (ret) { gf_log ("cli", GF_LOG_ERROR, "Unable to parse replace-brick CLI"); if (dict) - dict_destroy (dict); + dict_unref (dict); } return ret; @@ -2173,7 +2173,7 @@ cli_cmd_log_filename_parse (const char **words, int wordcount, dict_t **options) out: if (ret && dict) - dict_destroy (dict); + dict_unref (dict); return ret; } @@ -2230,7 +2230,7 @@ cli_cmd_log_level_parse (const char **words, int worcount, dict_t **options) out: if (ret && dict) - dict_destroy (dict); + dict_unref (dict); return ret; } @@ -2281,7 +2281,7 @@ cli_cmd_log_locate_parse (const char **words, int wordcount, dict_t **options) out: if (ret && dict) - dict_destroy (dict); + dict_unref (dict); return ret; } @@ -2335,7 +2335,7 @@ cli_cmd_log_rotate_parse (const char **words, int wordcount, dict_t **options) out: if (ret && dict) - dict_destroy (dict); + dict_unref (dict); return ret; } @@ -2757,7 +2757,7 @@ out: GF_FREE (slave_temp); if (ret) { if (dict) - dict_destroy (dict); + dict_unref (dict); } else *options = dict; @@ -2854,7 +2854,7 @@ cli_cmd_volume_profile_parse (const char **words, int wordcount, *options = dict; out: if (ret && dict) - dict_destroy (dict); + dict_unref (dict); return ret; } @@ -3043,7 +3043,7 @@ cli_cmd_volume_top_parse (const char **words, int wordcount, *options = dict; out: if (ret && dict) - dict_destroy (dict); + dict_unref (dict); return ret; } @@ -3256,7 +3256,7 @@ cli_cmd_volume_status_parse (const char **words, int wordcount, out: if (ret && dict) - dict_destroy (dict); + dict_unref (dict); return ret; } @@ -3318,7 +3318,7 @@ cli_cmd_volume_statedump_options_parse (const char **words, int wordcount, *options = dict; out: if (ret && dict) - dict_destroy (dict); + dict_unref (dict); if (ret) gf_log ("cli", GF_LOG_ERROR, "Error parsing dumpoptions"); return ret; @@ -3794,7 +3794,7 @@ done: out: if (ret && dict) - dict_destroy (dict); + dict_unref (dict); return ret; } @@ -5118,7 +5118,7 @@ cli_cmd_snapshot_parse (const char **words, int wordcount, dict_t **options, out: if (ret) { if (dict) - dict_destroy (dict); + dict_unref (dict); } else *options = dict; @@ -5373,7 +5373,7 @@ out: if (ret) { gf_log ("cli", GF_LOG_ERROR, "Unable to parse bitrot command"); if (dict) - dict_destroy (dict); + dict_unref (dict); } return ret; diff --git a/cli/src/cli-cmd-system.c b/cli/src/cli-cmd-system.c index 89d7d23187e..fc632cfcad2 100644 --- a/cli/src/cli-cmd-system.c +++ b/cli/src/cli-cmd-system.c @@ -66,7 +66,7 @@ cli_cmd_getspec_cbk (struct cli_state *state, struct cli_cmd_word *word, out: if (!proc && ret) { if (dict) - dict_destroy (dict); + dict_unref (dict); if (wordcount > 1) cli_out ("Fetching spec for volume %s failed", (char *)words[2]); @@ -109,7 +109,7 @@ cli_cmd_pmap_b2p_cbk (struct cli_state *state, struct cli_cmd_word *word, out: if (!proc && ret) { if (dict) - dict_destroy (dict); + dict_unref (dict); if (wordcount > 1) cli_out ("Fetching spec for volume %s failed", (char *)words[3]); @@ -188,7 +188,7 @@ make_seq_dict (int argc, char **argv) } if (ret) { - dict_destroy (dict); + dict_unref (dict); dict = NULL; } diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c index 08bab2fefb1..6d44095d757 100644 --- a/cli/src/cli-cmd-volume.c +++ b/cli/src/cli-cmd-volume.c @@ -594,7 +594,7 @@ cli_cmd_volume_rename_cbk (struct cli_state *state, struct cli_cmd_word *word, out: if (dict) - dict_destroy (dict); + dict_unref (dict); if (ret) { cli_cmd_sent_status_get (&sent); diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c index 40044dad753..3ea918a8cba 100644 --- a/cli/src/cli-rpc-ops.c +++ b/cli/src/cli-rpc-ops.c @@ -498,7 +498,7 @@ out: cli_cmd_broadcast_response (ret); if (dict) - dict_destroy (dict); + dict_unref (dict); return ret; } @@ -1067,7 +1067,7 @@ out: cli_cmd_broadcast_response (ret); if (dict) - dict_destroy (dict); + dict_unref (dict); free (rsp.dict.dict_val); diff --git a/cli/src/cli.c b/cli/src/cli.c index 518ae265f22..8e4caaa944e 100644 --- a/cli/src/cli.c +++ b/cli/src/cli.c @@ -575,7 +575,7 @@ cli_quotad_clnt_rpc_init (void) out: if (ret) { if (rpc_opts) - dict_destroy(rpc_opts); + dict_unref(rpc_opts); } return rpc; } |