diff options
author | Danny Al-Gaaf <danny.al-gaaf@bisect.de> | 2017-10-13 20:39:23 +0200 |
---|---|---|
committer | Danny Al-Gaaf <danny.al-gaaf@bisect.de> | 2017-10-25 18:14:05 +0200 |
commit | f24a0289ef5910924df41e8c9e4a0f548897cddd (patch) | |
tree | 162aeae8f904eb3c01d2c0149b4b4b36244fb8b6 /src/compressor | |
parent | rgw/rgw_op.cc: fix wrong function order (diff) | |
download | ceph-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.h | 4 |
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()); |