From ec770b7924848570c72a4e6d82f612d0c44936b1 Mon Sep 17 00:00:00 2001 From: Aurelien DARRAGON Date: Thu, 14 Sep 2023 11:41:46 +0200 Subject: [PATCH] MINOR: sink: remove useless check after sink creation It's useless to check if sink has been created with BUF type after calling sink_new_buf() since the goal of the function is to create a new sink of BUF type. --- src/sink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sink.c b/src/sink.c index e031398c8..4b458279e 100644 --- a/src/sink.c +++ b/src/sink.c @@ -830,7 +830,7 @@ static struct sink *sink_new_ringbuf(const char *id, const char *description, p->conf.args.line = p->conf.line = linenum; sink = sink_new_buf(id, description, LOG_FORMAT_RAW, BUFSIZE); - if (!sink || sink->type != SINK_TYPE_BUFFER) { + if (!sink) { memprintf(err_msg, "unable to create a new sink buffer for ring '%s'", id); goto err; }