Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/crm/common/strings_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ int pcmk__uint_from_hash(GHashTable *table, const char *key,
unsigned int default_val, unsigned int *result);
void pcmk__add_separated_word(GString **list, size_t init_size,
const char *word, const char *separator);
int pcmk__compress(const char *data, unsigned int length, unsigned int max,
char **result, unsigned int *result_len);
int pcmk__compress(const char *data, size_t length, char **result,
size_t *result_len);

int pcmk__scan_ll(const char *text, long long *result, long long default_value);
int pcmk__scan_min_int(const char *text, int *result, int minimum);
Expand Down
6 changes: 2 additions & 4 deletions lib/cluster/cpg.c
Original file line number Diff line number Diff line change
Expand Up @@ -982,11 +982,9 @@ send_cpg_text(const char *data, const pcmk__node_status_t *node,

} else {
char *compressed = NULL;
unsigned int new_size = 0;

if (pcmk__compress(data, (unsigned int) msg->size, 0, &compressed,
&new_size) == pcmk_rc_ok) {
size_t new_size = 0;

if (pcmk__compress(data, msg->size, &compressed, &new_size) == pcmk_rc_ok) {
msg->header.size = sizeof(pcmk__cpg_msg_t) + new_size;
msg = pcmk__realloc(msg, msg->header.size);
memcpy(msg->data, compressed, new_size);
Expand Down
Loading