diff --git a/include/fluent-bit/flb_msgpack_append_message.h b/include/fluent-bit/flb_msgpack_append_message.h index 25990c604f3..b2c5049febf 100644 --- a/include/fluent-bit/flb_msgpack_append_message.h +++ b/include/fluent-bit/flb_msgpack_append_message.h @@ -25,6 +25,7 @@ #define FLB_MAP_NOT_MODIFIED -1 #define FLB_MAP_EXPANSION_ERROR -2 #define FLB_MAP_EXPANSION_INVALID_VALUE_TYPE -3 +#define FLB_MSGPACK_UNPACK_ERROR -4 #include #include diff --git a/plugins/filter_parser/filter_parser.c b/plugins/filter_parser/filter_parser.c index 7c03566b60d..08fe3202f53 100644 --- a/plugins/filter_parser/filter_parser.c +++ b/plugins/filter_parser/filter_parser.c @@ -350,7 +350,7 @@ static int cb_parser_filter(const void *data, size_t bytes, out_buf = strdup(parsed_buf); out_size = parsed_size; } - if (ctx->hash_value_field!=NULL) { + if (ctx->hash_value_field != NULL) { char *new_buf = NULL; size_t new_size; int ret; diff --git a/src/flb_msgpack_append_message.c b/src/flb_msgpack_append_message.c index 8425d9a2a63..d606721702d 100644 --- a/src/flb_msgpack_append_message.c +++ b/src/flb_msgpack_append_message.c @@ -114,11 +114,11 @@ int flb_msgpack_append_map_to_record(char **result_buffer, if ((i=msgpack_unpack_next(&unpacker, map_data, map_size, &off)) != MSGPACK_UNPACK_SUCCESS ) { msgpack_unpacked_destroy(&unpacker); - return FLB_MAP_EXPANSION_ERROR; + return FLB_MSGPACK_UNPACK_ERROR; } if (unpacker.data.type != MSGPACK_OBJECT_MAP) { msgpack_unpacked_destroy(&unpacker); - return FLB_MAP_EXPANSION_ERROR; + return FLB_MSGPACK_UNPACK_ERROR; } message_entry.val = unpacker.data;