summaryrefslogtreecommitdiffstats
path: root/src/compressor
diff options
context:
space:
mode:
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>2017-10-13 20:39:23 +0200
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>2017-10-25 18:14:05 +0200
commitf24a0289ef5910924df41e8c9e4a0f548897cddd (patch)
tree162aeae8f904eb3c01d2c0149b4b4b36244fb8b6 /src/compressor
parentrgw/rgw_op.cc: fix wrong function order (diff)
downloadceph-f24a0289ef5910924df41e8c9e4a0f548897cddd.tar.xz
ceph-f24a0289ef5910924df41e8c9e4a0f548897cddd.zip
LZ4Compressor.h: fix usage of unsigned var
Fix for: [src/compressor/lz4/LZ4Compressor.h:49]: (style) Checking if unsigned variable 'compressed_len' is less than zero. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Diffstat (limited to 'src/compressor')
-rw-r--r--src/compressor/lz4/LZ4Compressor.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compressor/lz4/LZ4Compressor.h b/src/compressor/lz4/LZ4Compressor.h
index 55e816be4f9..3ab96e23332 100644
--- a/src/compressor/lz4/LZ4Compressor.h
+++ b/src/compressor/lz4/LZ4Compressor.h
@@ -39,7 +39,7 @@ class LZ4Compressor : public Compressor {
const char *data;
unsigned num = src.get_num_buffers();
uint32_t origin_len;
- uint32_t compressed_len;
+ int compressed_len;
::encode((uint32_t)num, dst);
while (left) {
origin_len = p.get_ptr_and_advance(left, &data);
@@ -51,7 +51,7 @@ class LZ4Compressor : public Compressor {
pos += compressed_len;
left -= origin_len;
::encode(origin_len, dst);
- ::encode(compressed_len, dst);
+ ::encode((uint32_t)compressed_len, dst);
}
assert(p.end());