Skip to content

Commit

Permalink
all: fix style issues
Browse files Browse the repository at this point in the history
Signed-off-by: Balazs Scheidler <[email protected]>
  • Loading branch information
bazsi authored and alltilla committed Jun 10, 2024
1 parent b77783c commit 4d2bcfb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/cfg-parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ extern CfgParser main_parser;
void \
parser_prefix ## error(const CFG_LTYPE *yylloc, CfgLexer *lexer, root_type instance, gpointer arg, const char *msg) \
{ \
report_syntax_error(lexer, yylloc, cfg_lexer_get_context_description(lexer), msg); \
report_syntax_error(lexer, yylloc, cfg_lexer_get_context_description(lexer), msg); \
}

void report_syntax_error(CfgLexer *lexer, const CFG_LTYPE *yylloc, const char *what, const char *msg);
Expand Down
3 changes: 2 additions & 1 deletion lib/filterx/object-json.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,8 @@ filterx_json_new_from_args(FilterXExpr *s, GPtrArray *args)
return filterx_json_new_from_repr(repr, repr_len);

error:
filterx_eval_push_error_info("Argument must be a json, a string or a syslog-ng list", s, g_strdup_printf("got \"%s\" instead", arg->type->name), TRUE);
filterx_eval_push_error_info("Argument must be a json, a string or a syslog-ng list", s,
g_strdup_printf("got \"%s\" instead", arg->type->name), TRUE);
return NULL;
}

Expand Down
12 changes: 8 additions & 4 deletions modules/grpc/otel/tests/test-otel-filterx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,8 @@ Test(otel_filterx, logrecord_from_protobuf)
GPtrArray *args = g_ptr_array_new_full(1, (GDestroyNotify) filterx_object_unref);
g_ptr_array_insert(args, 0, filterx_protobuf_new(serialized_log_record.c_str(), serialized_log_record.length()));

FilterXOtelLogRecord *filterx_otel_logrecord = (FilterXOtelLogRecord *) filterx_otel_logrecord_new_from_args(NULL, args);
FilterXOtelLogRecord *filterx_otel_logrecord = (FilterXOtelLogRecord *) filterx_otel_logrecord_new_from_args(NULL,
args);
cr_assert(filterx_otel_logrecord);

const LogRecord &log_record_from_filterx = filterx_otel_logrecord->cpp->get_value();
Expand All @@ -188,7 +189,8 @@ Test(otel_filterx, logrecord_from_protobuf_invalid_arg)
GPtrArray *args = g_ptr_array_new_full(1, (GDestroyNotify) filterx_object_unref);
g_ptr_array_insert(args, 0, filterx_string_new("", 0));

FilterXOtelLogRecord *filterx_otel_logrecord = (FilterXOtelLogRecord *) filterx_otel_logrecord_new_from_args(NULL, args);
FilterXOtelLogRecord *filterx_otel_logrecord = (FilterXOtelLogRecord *) filterx_otel_logrecord_new_from_args(NULL,
args);
cr_assert_not(filterx_otel_logrecord);

g_ptr_array_free(args, TRUE);
Expand All @@ -199,7 +201,8 @@ Test(otel_filterx, logrecord_from_protobuf_malformed_data)
GPtrArray *args = g_ptr_array_new_full(1, (GDestroyNotify) filterx_object_unref);
g_ptr_array_insert(args, 0, filterx_protobuf_new("1234", 4));

FilterXOtelLogRecord *filterx_otel_logrecord = (FilterXOtelLogRecord *) filterx_otel_logrecord_new_from_args(NULL, args);
FilterXOtelLogRecord *filterx_otel_logrecord = (FilterXOtelLogRecord *) filterx_otel_logrecord_new_from_args(NULL,
args);
cr_assert_not(filterx_otel_logrecord);

g_ptr_array_free(args, TRUE);
Expand All @@ -211,7 +214,8 @@ Test(otel_filterx, logrecord_too_many_args)
g_ptr_array_insert(args, 0, filterx_string_new("foo", 3));
g_ptr_array_insert(args, 1, filterx_protobuf_new("bar", 3));

FilterXOtelLogRecord *filterx_otel_logrecord = (FilterXOtelLogRecord *) filterx_otel_logrecord_new_from_args(NULL, args);
FilterXOtelLogRecord *filterx_otel_logrecord = (FilterXOtelLogRecord *) filterx_otel_logrecord_new_from_args(NULL,
args);
cr_assert_not(filterx_otel_logrecord);

g_ptr_array_free(args, TRUE);
Expand Down

0 comments on commit 4d2bcfb

Please sign in to comment.