summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/client
diff options
context:
space:
mode:
authorJeff Darcy <jdarcy@redhat.com>2016-05-03 09:29:46 -0400
committerJeff Darcy <jdarcy@redhat.com>2016-05-04 04:25:45 -0700
commitc3c999776e6607b2e2361aeecc0fd4661d155536 (patch)
treed6f7037b2a5c16b48b32ce744b9d4b5c89b99e57 /xlators/protocol/client
parentb4dc1a55486e6a7e4ec72ea494709c1e7da25f50 (diff)
protocol/client: fix coding style violations
Commit 45fa52d7 added some massive violations of our 80-column rule. This commit fixes them. Change-Id: I7bb588b99dbbff4f0b9874ef10f200f73ac1b627 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/14192 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anuradha Talur <atalur@redhat.com>
Diffstat (limited to 'xlators/protocol/client')
-rw-r--r--xlators/protocol/client/src/client.h69
1 files changed, 37 insertions, 32 deletions
diff --git a/xlators/protocol/client/src/client.h b/xlators/protocol/client/src/client.h
index 46a7875682e..61409d1fc79 100644
--- a/xlators/protocol/client/src/client.h
+++ b/xlators/protocol/client/src/client.h
@@ -43,45 +43,50 @@ typedef enum {
FALLBACK_TO_ANON_FD = 1
} clnt_remote_fd_flags_t;
-#define CLIENT_POST_FOP(fop, this_rsp_u, this_args_cbk, params ...) \
- do { \
- gf_common_rsp *_this_rsp = &this_rsp_u->compound_rsp_u.compound_##fop##_rsp; \
- int _op_ret = 0; \
- int _op_errno = 0; \
- \
- _op_ret = _this_rsp->op_ret; \
- _op_errno = gf_error_to_errno (_this_rsp->op_errno); \
- args_##fop##_cbk_store (this_args_cbk, _op_ret, _op_errno, params); \
+#define CPD_REQ_FIELD(v,f) (v)->compound_req_u.compound_##f##_req
+#define CPD_RSP_FIELD(v,f) (v)->compound_rsp_u.compound_##f##_rsp
+
+#define CLIENT_POST_FOP(fop, this_rsp_u, this_args_cbk, params ...) \
+ do { \
+ gf_common_rsp *_this_rsp = &CPD_RSP_FIELD(this_rsp_u,fop); \
+ int _op_ret = 0; \
+ int _op_errno = 0; \
+ \
+ _op_ret = _this_rsp->op_ret; \
+ _op_errno = gf_error_to_errno (_this_rsp->op_errno); \
+ args_##fop##_cbk_store (this_args_cbk, _op_ret, _op_errno, \
+ params); \
} while (0)
-#define CLIENT_POST_FOP_TYPE(fop, this_rsp_u, this_args_cbk, params ...) \
- do { \
- gfs3_##fop##_rsp *_this_rsp = &this_rsp_u->compound_rsp_u.compound_##fop##_rsp; \
- int _op_ret = 0; \
- int _op_errno = 0; \
- \
- _op_ret = _this_rsp->op_ret; \
- _op_errno = gf_error_to_errno (_this_rsp->op_errno); \
- args_##fop##_cbk_store (this_args_cbk, _op_ret, _op_errno, params); \
+#define CLIENT_POST_FOP_TYPE(fop, this_rsp_u, this_args_cbk, params ...) \
+ do { \
+ gfs3_##fop##_rsp *_this_rsp = &CPD_RSP_FIELD(this_rsp_u,fop);\
+ int _op_ret = 0; \
+ int _op_errno = 0; \
+ \
+ _op_ret = _this_rsp->op_ret; \
+ _op_errno = gf_error_to_errno (_this_rsp->op_errno); \
+ args_##fop##_cbk_store (this_args_cbk, _op_ret, _op_errno, \
+ params); \
} while (0)
-#define CLIENT_PRE_FOP(fop, xl, compound_req, op_errno, label, params ...) \
- do { \
+#define CLIENT_PRE_FOP(fop, xl, compound_req, op_errno, label, params ...) \
+ do { \
gfs3_##fop##_req *_req = (gfs3_##fop##_req *) compound_req; \
- int _ret = 0; \
- \
- _ret = client_pre_##fop (xl, _req, params); \
- if (_ret < 0) { \
- op_errno = -ret; \
- goto label; \
- } \
+ int _ret = 0; \
+ \
+ _ret = client_pre_##fop (xl, _req, params); \
+ if (_ret < 0) { \
+ op_errno = -ret; \
+ goto label; \
+ } \
} while (0)
-#define CLIENT_COMPOUND_FOP_CLEANUP(curr_req, fop) \
- do { \
- gfs3_##fop##_req *_req = &curr_req->compound_req_u.compound_##fop##_req;\
- \
- GF_FREE (_req->xdata.xdata_val); \
+#define CLIENT_COMPOUND_FOP_CLEANUP(curr_req, fop) \
+ do { \
+ gfs3_##fop##_req *_req = &CPD_REQ_FIELD(curr_req,fop); \
+ \
+ GF_FREE (_req->xdata.xdata_val); \
} while (0)
#define CLIENT_GET_REMOTE_FD(xl, fd, flags, remote_fd, op_errno, label) \