Skip to content

Commit

Permalink
Merge pull request #1220 from ros/revert_lz4_deprecation
Browse files Browse the repository at this point in the history
Revert "Replaced deprecated lz4 function call"
  • Loading branch information
dirk-thomas authored Nov 7, 2017
2 parents 4b0232c + f5b795e commit 2804ea6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions utilities/roslz4/src/lz4s.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,10 @@ int bufferToOutput(roslz4_stream *str) {
state->buffer_offset, str->output_left);

// Shrink output by 1 to detect if data is not compressible
uint32_t comp_size = LZ4_compress_default(state->buffer,
str->output_next + 4,
(int) state->buffer_offset,
(int) uncomp_size - 1);
uint32_t comp_size = LZ4_compress_limitedOutput(state->buffer,
str->output_next + 4,
(int) state->buffer_offset,
(int) uncomp_size - 1);
uint32_t wrote;
if (comp_size > 0) {
DEBUG("bufferToOutput() Compressed to %i bytes\n", comp_size);
Expand Down

0 comments on commit 2804ea6

Please sign in to comment.