diff options
author | Sage Weil <sage.weil@dreamhost.com> | 2012-04-08 20:59:33 -0700 |
---|---|---|
committer | Sage Weil <sage.weil@dreamhost.com> | 2012-04-08 20:59:33 -0700 |
commit | 7951d7e4421b35849a7ca30d11c4c0e200a6ebf5 (patch) | |
tree | 68b94f13109f68398582ddfa6eb9d4c7d4ccddad /src/include | |
parent | dd8fd1688a358758d5c9c605ddb1e87aedf2ade4 (diff) | |
parent | 9832696864300afb81d51e153a6f45169fbff099 (diff) | |
download | ceph-7951d7e4421b35849a7ca30d11c4c0e200a6ebf5.tar.gz |
Merge remote branch 'gh/stable' into next
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/encoding.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/include/encoding.h b/src/include/encoding.h index fa1cebeec48..e9bf1e92601 100644 --- a/src/include/encoding.h +++ b/src/include/encoding.h @@ -656,7 +656,7 @@ inline void decode(std::deque<T>& ls, bufferlist::iterator& p) ::encode(struct_v, bl); \ ::encode(struct_compat, bl); \ __le32 struct_len = 0; \ - unsigned struct_len_pos = bl.length(); \ + buffer::list::iterator struct_len_it = bl.end(); \ ::encode(struct_len, bl); \ do { @@ -667,8 +667,8 @@ inline void decode(std::deque<T>& ls, bufferlist::iterator& p) */ #define ENCODE_FINISH(bl) \ } while (false); \ - struct_len = bl.length() - struct_len_pos - sizeof(struct_len); \ - bl.copy_in(struct_len_pos, 4, (char *)&struct_len); + struct_len = bl.length() - struct_len_it.get_off() - sizeof(struct_len); \ + struct_len_it.copy_in(4, (char *)&struct_len); #define DECODE_ERR_VERSION(func, v) \ "" #func " unknown encoding version > " #v |