From 550cdfbcf2a5300c926f87403e12f19424bffeac Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Wed, 28 Jul 2010 04:23:57 +0000 Subject: fix all clang errors in xlator/protocol Signed-off-by: Amar Tumballi Signed-off-by: Anand V. Avati BUG: 1092 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1092 --- xlators/protocol/server/src/server3_1-fops.c | 58 +--------------------------- 1 file changed, 2 insertions(+), 56 deletions(-) (limited to 'xlators/protocol/server/src/server3_1-fops.c') diff --git a/xlators/protocol/server/src/server3_1-fops.c b/xlators/protocol/server/src/server3_1-fops.c index d100f5fde65..18ace876c7b 100644 --- a/xlators/protocol/server/src/server3_1-fops.c +++ b/xlators/protocol/server/src/server3_1-fops.c @@ -1742,7 +1742,7 @@ server_rchecksum_resume (call_frame_t *frame, xlator_t *bound_xl) { server_state_t *state = NULL; int op_ret = 0; - int op_errno = 0; + int op_errno = EINVAL; state = CALL_STATE (frame); @@ -1758,7 +1758,7 @@ server_rchecksum_resume (call_frame_t *frame, xlator_t *bound_xl) return 0; err: - server_rchecksum_cbk (frame, NULL, frame->this, -1, EINVAL, 0, NULL); + server_rchecksum_cbk (frame, NULL, frame->this, op_ret, op_errno, 0, NULL); return 0; @@ -2842,7 +2842,6 @@ int server_create (rpcsvc_request_t *req) { server_state_t *state = NULL; - server_connection_t *conn = NULL; call_frame_t *frame = NULL; gfs3_create_req args = {0,}; char path[SERVER_PATH_MAX] = {0,}; @@ -2851,8 +2850,6 @@ server_create (rpcsvc_request_t *req) if (!req) return 0; - conn = req->conn->trans->xl_private; - args.path = path; args.bname = bname; @@ -3675,7 +3672,6 @@ int server_getxattr (rpcsvc_request_t *req) { server_state_t *state = NULL; - server_connection_t *conn = NULL; call_frame_t *frame = NULL; gfs3_getxattr_req args = {0,}; char path[SERVER_PATH_MAX] = {0,}; @@ -3684,8 +3680,6 @@ server_getxattr (rpcsvc_request_t *req) if (!req) return 0; - conn = req->conn->trans->xl_private; - args.path = path; args.name = name; @@ -3728,7 +3722,6 @@ int server_fgetxattr (rpcsvc_request_t *req) { server_state_t *state = NULL; - server_connection_t *conn = NULL; call_frame_t *frame = NULL; gfs3_fgetxattr_req args = {0,}; char name[4096] = {0,}; @@ -3736,8 +3729,6 @@ server_fgetxattr (rpcsvc_request_t *req) if (!req) return 0; - conn = req->conn->trans->xl_private; - args.name = name; if (!xdr_to_fgetxattr_req (req->msg[0], &args)) { //failed to decode msg; @@ -3777,7 +3768,6 @@ int server_removexattr (rpcsvc_request_t *req) { server_state_t *state = NULL; - server_connection_t *conn = NULL; call_frame_t *frame = NULL; gfs3_removexattr_req args = {0,}; char path[SERVER_PATH_MAX] = {0,}; @@ -3786,8 +3776,6 @@ server_removexattr (rpcsvc_request_t *req) if (!req) return 0; - conn = req->conn->trans->xl_private; - args.path = path; args.name = name; if (!xdr_to_removexattr_req (req->msg[0], &args)) { @@ -3874,15 +3862,12 @@ int server_readdirp (rpcsvc_request_t *req) { server_state_t *state = NULL; - server_connection_t *conn = NULL; call_frame_t *frame = NULL; gfs3_readdirp_req args = {0,}; if (!req) return 0; - conn = req->conn->trans->xl_private; - if (!xdr_to_readdirp_req (req->msg[0], &args)) { //failed to decode msg; req->rpc_err = GARBAGE_ARGS; @@ -3918,15 +3903,12 @@ int server_readdir (rpcsvc_request_t *req) { server_state_t *state = NULL; - server_connection_t *conn = NULL; call_frame_t *frame = NULL; gfs3_readdir_req args = {0,}; if (!req) return 0; - conn = req->conn->trans->xl_private; - if (!xdr_to_readdir_req (req->msg[0], &args)) { //failed to decode msg; req->rpc_err = GARBAGE_ARGS; @@ -3962,15 +3944,12 @@ int server_fsyncdir (rpcsvc_request_t *req) { server_state_t *state = NULL; - server_connection_t *conn = NULL; call_frame_t *frame = NULL; gfs3_fsyncdir_req args = {0,}; if (!req) return 0; - conn = req->conn->trans->xl_private; - if (!xdr_to_fsyncdir_req (req->msg[0], &args)) { //failed to decode msg; req->rpc_err = GARBAGE_ARGS; @@ -4007,7 +3986,6 @@ int server_mknod (rpcsvc_request_t *req) { server_state_t *state = NULL; - server_connection_t *conn = NULL; call_frame_t *frame = NULL; gfs3_mknod_req args = {0,}; char bname[SERVER_PATH_MAX] = {0,}; @@ -4016,7 +3994,6 @@ server_mknod (rpcsvc_request_t *req) if (!req) return 0; - conn = req->conn->trans->xl_private; args.path = path; args.bname = bname; @@ -4060,7 +4037,6 @@ int server_mkdir (rpcsvc_request_t *req) { server_state_t *state = NULL; - server_connection_t *conn = NULL; call_frame_t *frame = NULL; gfs3_mkdir_req args = {0,}; char bname[SERVER_PATH_MAX] = {0,}; @@ -4069,7 +4045,6 @@ server_mkdir (rpcsvc_request_t *req) if (!req) return 0; - conn = req->conn->trans->xl_private; args.path = path; args.bname = bname; @@ -4112,7 +4087,6 @@ int server_rmdir (rpcsvc_request_t *req) { server_state_t *state = NULL; - server_connection_t *conn = NULL; call_frame_t *frame = NULL; gfs3_rmdir_req args = {0,}; char bname[SERVER_PATH_MAX] = {0,}; @@ -4121,7 +4095,6 @@ server_rmdir (rpcsvc_request_t *req) if (!req) return 0; - conn = req->conn->trans->xl_private; args.path = path; args.bname = bname; @@ -4163,7 +4136,6 @@ int server_inodelk (rpcsvc_request_t *req) { server_state_t *state = NULL; - server_connection_t *conn = NULL; call_frame_t *frame = NULL; gfs3_inodelk_req args = {0,}; char path[SERVER_PATH_MAX] = {0,}; @@ -4173,7 +4145,6 @@ server_inodelk (rpcsvc_request_t *req) if (!req) return 0; - conn = req->conn->trans->xl_private; args.path = path; args.volume = volume; @@ -4242,7 +4213,6 @@ int server_finodelk (rpcsvc_request_t *req) { server_state_t *state = NULL; - server_connection_t *conn = NULL; call_frame_t *frame = NULL; gfs3_finodelk_req args = {0,}; char volume[4096] = {0,}; @@ -4250,8 +4220,6 @@ server_finodelk (rpcsvc_request_t *req) if (!req) return 0; - conn = req->conn->trans->xl_private; - args.volume = volume; if (!xdr_to_finodelk_req (req->msg[0], &args)) { //failed to decode msg; @@ -4317,7 +4285,6 @@ int server_entrylk (rpcsvc_request_t *req) { server_state_t *state = NULL; - server_connection_t *conn = NULL; call_frame_t *frame = NULL; gfs3_entrylk_req args = {0,}; char path[SERVER_PATH_MAX] = {0,}; @@ -4331,8 +4298,6 @@ server_entrylk (rpcsvc_request_t *req) args.volume = volume; args.name = name; - conn = req->conn->trans->xl_private; - if (!xdr_to_entrylk_req (req->msg[0], &args)) { //failed to decode msg; req->rpc_err = GARBAGE_ARGS; @@ -4375,7 +4340,6 @@ int server_fentrylk (rpcsvc_request_t *req) { server_state_t *state = NULL; - server_connection_t *conn = NULL; call_frame_t *frame = NULL; gfs3_fentrylk_req args = {0,}; char name[4096] = {0,}; @@ -4384,8 +4348,6 @@ server_fentrylk (rpcsvc_request_t *req) if (!req) return 0; - conn = req->conn->trans->xl_private; - args.name = name; args.volume = volume; if (!xdr_to_fentrylk_req (req->msg[0], &args)) { @@ -4427,7 +4389,6 @@ int server_access (rpcsvc_request_t *req) { server_state_t *state = NULL; - server_connection_t *conn = NULL; call_frame_t *frame = NULL; gfs3_access_req args = {0,}; char path[SERVER_PATH_MAX] = {0,}; @@ -4435,8 +4396,6 @@ server_access (rpcsvc_request_t *req) if (!req) return 0; - conn = req->conn->trans->xl_private; - args.path = path; if (!xdr_to_access_req (req->msg[0], &args)) { //failed to decode msg; @@ -4476,7 +4435,6 @@ int server_symlink (rpcsvc_request_t *req) { server_state_t *state = NULL; - server_connection_t *conn = NULL; call_frame_t *frame = NULL; gfs3_symlink_req args = {0,}; char linkname[4096] = {0,}; @@ -4486,7 +4444,6 @@ server_symlink (rpcsvc_request_t *req) if (!req) return 0; - conn = req->conn->trans->xl_private; args.path = path; args.bname = bname; args.linkname = linkname; @@ -4530,7 +4487,6 @@ int server_link (rpcsvc_request_t *req) { server_state_t *state = NULL; - server_connection_t *conn = NULL; call_frame_t *frame = NULL; gfs3_link_req args = {0,}; char oldpath[SERVER_PATH_MAX] = {0,}; @@ -4540,8 +4496,6 @@ server_link (rpcsvc_request_t *req) if (!req) return 0; - conn = req->conn->trans->xl_private; - args.oldpath = oldpath; args.newpath = newpath; args.newbname = newbname; @@ -4588,7 +4542,6 @@ int server_rename (rpcsvc_request_t *req) { server_state_t *state = NULL; - server_connection_t *conn = NULL; call_frame_t *frame = NULL; gfs3_rename_req args = {0,}; char oldpath[SERVER_PATH_MAX] = {0,}; @@ -4599,8 +4552,6 @@ server_rename (rpcsvc_request_t *req) if (!req) return 0; - conn = req->conn->trans->xl_private; - args.oldpath = oldpath; args.oldbname = oldbname; args.newpath = newpath; @@ -4723,15 +4674,12 @@ int server_rchecksum (rpcsvc_request_t *req) { server_state_t *state = NULL; - server_connection_t *conn = NULL; call_frame_t *frame = NULL; gfs3_rchecksum_req args = {0,}; if (!req) return 0; - conn = req->conn->trans->xl_private; - if (!xdr_to_rchecksum_req (req->msg[0], &args)) { //failed to decode msg; req->rpc_err = GARBAGE_ARGS; @@ -4888,7 +4836,6 @@ int server_statfs (rpcsvc_request_t *req) { server_state_t *state = NULL; - server_connection_t *conn = NULL; call_frame_t *frame = NULL; gfs3_statfs_req args = {0,}; char path[SERVER_PATH_MAX] = {0,}; @@ -4896,7 +4843,6 @@ server_statfs (rpcsvc_request_t *req) if (!req) return 0; - conn = req->conn->trans->xl_private; args.path = path; if (!xdr_to_statfs_req (req->msg[0], &args)) { //failed to decode msg; -- cgit