Skip to content

Commit

Permalink
out_oracle_log_analytics: remove flb_errno that checks NULL
Browse files Browse the repository at this point in the history
Signed-off-by: Takahiro Yamashita <[email protected]>
  • Loading branch information
nokute78 authored and edsiper committed Aug 5, 2024
1 parent c15ca2f commit 209095d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions plugins/out_oracle_log_analytics/oci_logan_conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,6 @@ struct flb_oci_logan *flb_oci_logan_conf_create(struct flb_output_instance *ins,
if (ctx->oci_config_in_record == FLB_FALSE) {
if (ctx->oci_la_log_source_name == NULL ||
ctx->oci_la_log_group_id == NULL) {
flb_errno();
flb_plg_error(ctx->ins,
"log source name and log group id are required");
flb_oci_logan_conf_destroy(ctx);
Expand Down Expand Up @@ -318,7 +317,6 @@ struct flb_oci_logan *flb_oci_logan_conf_create(struct flb_output_instance *ins,
}

if (!ctx->config_file_location) {
flb_errno();
flb_plg_error(ctx->ins, "config file location is required");
flb_oci_logan_conf_destroy(ctx);
return NULL;
Expand All @@ -336,7 +334,6 @@ struct flb_oci_logan *flb_oci_logan_conf_create(struct flb_output_instance *ins,
}
else {
if (!ctx->region) {
flb_errno();
flb_plg_error(ctx->ins, "Region is required");
flb_oci_logan_conf_destroy(ctx);
return NULL;
Expand All @@ -347,7 +344,6 @@ struct flb_oci_logan *flb_oci_logan_conf_create(struct flb_output_instance *ins,

if (!ctx->uri) {
if (!ctx->namespace) {
flb_errno();
flb_plg_error(ctx->ins, "Namespace is required");
flb_oci_logan_conf_destroy(ctx);
return NULL;
Expand Down Expand Up @@ -490,4 +486,4 @@ int flb_oci_logan_conf_destroy(struct flb_oci_logan *ctx) {

flb_free(ctx);
return 0;
}
}

0 comments on commit 209095d

Please sign in to comment.