summaryrefslogtreecommitdiff
path: root/fs/ceph/mon_client.c
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2009-10-14 09:59:09 -0700
committerSage Weil <sage@newdream.net>2009-10-14 09:59:09 -0700
commitc89136ea4253c73e89e97f5138bb22d97ad9f564 (patch)
treeba8080adfaa6f5b84eadd4d65eff70840f9dfe22 /fs/ceph/mon_client.c
parent535bbb530764b1b2b3b732837f0e61e1baae7109 (diff)
ceph: convert encode/decode macros to inlines
This avoids the fugly pass by reference and makes the code a bit easier to read. Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/mon_client.c')
-rw-r--r--fs/ceph/mon_client.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ceph/mon_client.c b/fs/ceph/mon_client.c
index d6c8e783467e..bea2be9077e4 100644
--- a/fs/ceph/mon_client.c
+++ b/fs/ceph/mon_client.c
@@ -45,9 +45,9 @@ struct ceph_monmap *ceph_monmap_decode(void *p, void *end)
ceph_decode_need(&p, end, sizeof(fsid) + 2*sizeof(u32), bad);
ceph_decode_copy(&p, &fsid, sizeof(fsid));
- ceph_decode_32(&p, epoch);
+ epoch = ceph_decode_32(&p);
- ceph_decode_32(&p, num_mon);
+ num_mon = ceph_decode_32(&p);
ceph_decode_need(&p, end, num_mon*sizeof(m->mon_inst[0]), bad);
if (num_mon >= CEPH_MAX_MON)