diff options
author | Amar Tumballi <amar@gluster.com> | 2010-07-27 11:12:51 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-07-28 03:34:44 -0700 |
commit | 0aae2c46579421b871919e93619273d9a9bc79fb (patch) | |
tree | c9b7405a80f509d5a5da2cf4882144cabf5b93c7 /rpc/rpc-lib/src/rpcsvc-auth.c | |
parent | b2b6281e3487d3d797ab7974df69790a28c443c9 (diff) |
fix all the clang errors in 'rpc/*'
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 1133 ()
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1133
Diffstat (limited to 'rpc/rpc-lib/src/rpcsvc-auth.c')
-rw-r--r-- | rpc/rpc-lib/src/rpcsvc-auth.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/rpc/rpc-lib/src/rpcsvc-auth.c b/rpc/rpc-lib/src/rpcsvc-auth.c index 75305e68e2a..381cf282305 100644 --- a/rpc/rpc-lib/src/rpcsvc-auth.c +++ b/rpc/rpc-lib/src/rpcsvc-auth.c @@ -85,7 +85,7 @@ rpcsvc_auth_add_initers (rpcsvc_t *svc) ret = 0; err: - return 0; + return ret; } @@ -142,14 +142,26 @@ rpcsvc_auth_init_auths (rpcsvc_t *svc, dict_t *options) * it by default. This is a globally default rule, the user is still * allowed to disable the two for particular subvolumes. */ - if (!dict_get (options, "rpc-auth.auth-null")) + if (!dict_get (options, "rpc-auth.auth-null")) { ret = dict_set_str (options, "rpc-auth.auth-null", "on"); + if (ret) + gf_log ("rpc-auth", GF_LOG_DEBUG, + "dict_set failed for 'auth-nill'"); + } - if (!dict_get (options, "rpc-auth.auth-unix")) + if (!dict_get (options, "rpc-auth.auth-unix")) { ret = dict_set_str (options, "rpc-auth.auth-unix", "on"); + if (ret) + gf_log ("rpc-auth", GF_LOG_DEBUG, + "dict_set failed for 'auth-unix'"); + } - if (!dict_get (options, "rpc-auth.auth-glusterfs")) + if (!dict_get (options, "rpc-auth.auth-glusterfs")) { ret = dict_set_str (options, "rpc-auth.auth-glusterfs", "on"); + if (ret) + gf_log ("rpc-auth", GF_LOG_DEBUG, + "dict_set failed for 'auth-unix'"); + } list_for_each_entry_safe (auth, tmp, &svc->authschemes, authlist) { ret = rpcsvc_auth_init_auth (svc, options, auth); @@ -191,7 +203,6 @@ out: rpcsvc_auth_t * __rpcsvc_auth_get_handler (rpcsvc_request_t *req) { - int ret = -1; struct rpcsvc_auth_list *auth = NULL; struct rpcsvc_auth_list *tmp = NULL; rpcsvc_t *svc = NULL; @@ -207,7 +218,6 @@ __rpcsvc_auth_get_handler (rpcsvc_request_t *req) if (list_empty (&svc->authschemes)) { gf_log (GF_RPCSVC, GF_LOG_WARNING, "No authentication!"); - ret = 0; goto err; } |