diff options
author | Sage Weil <sage@inktank.com> | 2013-09-27 15:29:18 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-10-16 09:28:14 -0700 |
commit | a3e9344103525dbbb7dc8cd70a4b8c1df134685d (patch) | |
tree | e86cdbf2baf4e90ab193fa9f3704270fb672791a | |
parent | 88ae8f6805a331b9d6b80f8f1301dddaa6f767c3 (diff) | |
download | ceph-a3e9344103525dbbb7dc8cd70a4b8c1df134685d.tar.gz |
common/buffer: explicitly init zbuf to zeros
This might not be necessary?
Signed-off-by: Sage Weil <sage@inktank.com>
-rw-r--r-- | src/common/buffer.cc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/common/buffer.cc b/src/common/buffer.cc index 3a8190f0280..064775d2993 100644 --- a/src/common/buffer.cc +++ b/src/common/buffer.cc @@ -31,8 +31,17 @@ namespace ceph { - -static unsigned char zbuf[128]; + // some zeros; used when concatenating buffers with cached crc + static unsigned char zbuf[128] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }; #ifdef BUFFER_DEBUG static uint32_t simple_spinlock_t buffer_debug_lock = SIMPLE_SPINLOCK_INITIALIZER; |