summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVijay Bellur <vbellur@redhat.com>2013-08-08 12:21:44 +0530
committerVijay Bellur <vbellur@redhat.com>2013-08-08 12:21:44 +0530
commit140423259b9ec893279b99fdecbbc8d47deb77b6 (patch)
treeb4fe1ac89bb2182b36bc1e6869e089b426db3de4
parent4a8c60e941caa61df5ff2a6a6d47826f1deeb0ad (diff)
features/quota: Fix compilation warnings
Change-Id: Ie0b3af8b52f2d909c61094bdcaccfd724ff4ecc0
-rw-r--r--xlators/features/quota/src/quota-enforcer-client.c16
-rw-r--r--xlators/features/quota/src/quotad-aggregator.c16
2 files changed, 24 insertions, 8 deletions
diff --git a/xlators/features/quota/src/quota-enforcer-client.c b/xlators/features/quota/src/quota-enforcer-client.c
index 15dc9e4d..9dcd8dc5 100644
--- a/xlators/features/quota/src/quota-enforcer-client.c
+++ b/xlators/features/quota/src/quota-enforcer-client.c
@@ -315,10 +315,18 @@ quota_enforcer_init (xlator_t *this, dict_t *options)
priv = this->private;
priv->quota_enforcer = &quota_enforcer_clnt;
- dict_set_str (options, "transport.address-family", "unix");
- dict_set_str (options, "transport-type", "socket");
- dict_set_str (options, "transport.socket.connect-path",
- "/tmp/quotad.socket");
+ ret = dict_set_str (options, "transport.address-family", "unix");
+ if (ret)
+ goto out;
+
+ ret = dict_set_str (options, "transport-type", "socket");
+ if (ret)
+ goto out;
+
+ ret = dict_set_str (options, "transport.socket.connect-path",
+ "/tmp/quotad.socket");
+ if (ret)
+ goto out;
rpc = rpc_clnt_new (options, this->ctx, this->name, 16);
if (!rpc)
diff --git a/xlators/features/quota/src/quotad-aggregator.c b/xlators/features/quota/src/quotad-aggregator.c
index 0363135f..d3afd443 100644
--- a/xlators/features/quota/src/quotad-aggregator.c
+++ b/xlators/features/quota/src/quotad-aggregator.c
@@ -223,10 +223,18 @@ quotad_aggregator_init (xlator_t *this)
priv = this->private;
- dict_set_str (this->options, "transport.address-family", "unix");
- dict_set_str (this->options, "transport-type", "socket");
- dict_set_str (this->options, "transport.socket.listen-path",
- "/tmp/quotad.socket");
+ ret = dict_set_str (this->options, "transport.address-family", "unix");
+ if (ret)
+ goto out;
+
+ ret = dict_set_str (this->options, "transport-type", "socket");
+ if (ret)
+ goto out;
+
+ ret = dict_set_str (this->options, "transport.socket.listen-path",
+ "/tmp/quotad.socket");
+ if (ret)
+ goto out;
/* RPC related */
priv->rpcsvc = rpcsvc_init (this, this->ctx, this->options, 0);