Skip to content
Snippets Groups Projects
Commit 68d348d6 authored by Dominik Loidolt's avatar Dominik Loidolt
Browse files

Some minor refactoring

parent 33fd86bd
No related branches found
No related tags found
1 merge request!26Adapt cmp_tool to the chunk decompression
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
((b) > maximum_unsigned_value_of_type(a) - (a)) ((b) > maximum_unsigned_value_of_type(a) - (a))
#define __get_unaligned_t(type, ptr) ({ \ #define __get_unaligned_t(type, ptr) __extension__ ({ \
const struct { type x; } __attribute__((packed)) *__pptr = (__typeof__(__pptr))(ptr); \ const struct { type x; } __attribute__((packed)) *__pptr = (__typeof__(__pptr))(ptr); \
__pptr->x; \ __pptr->x; \
}) })
......
...@@ -2305,7 +2305,7 @@ static int set_cmp_col_size(uint8_t *p, int cmp_col_size) ...@@ -2305,7 +2305,7 @@ static int set_cmp_col_size(uint8_t *p, int cmp_col_size)
if (cmp_col_size > UINT16_MAX) if (cmp_col_size > UINT16_MAX)
return -1; return -1;
v -= COLLECTION_HDR_SIZE+2; v -= COLLECTION_HDR_SIZE+CMP_COLLECTION_FILD_SIZE;
if (p) { if (p) {
memset(p, v >> 8, 1); memset(p, v >> 8, 1);
memset(p+1, v & 0xFF, 1); memset(p+1, v & 0xFF, 1);
...@@ -2700,8 +2700,8 @@ int32_t compress_chunk(void *chunk, uint32_t chunk_size, ...@@ -2700,8 +2700,8 @@ int32_t compress_chunk(void *chunk, uint32_t chunk_size,
return -1; return -1;
} }
err = cmp_ent_build_chunk_header((struct cmp_entity *)dst, chunk_size, &cfg, err = cmp_ent_build_chunk_header((struct cmp_entity *)dst, chunk_size,
start_timestamp, cmp_size_byte); &cfg, start_timestamp, cmp_size_byte);
if (err < 0) if (err < 0)
return err; return err;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment