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.
This commit is contained in:
Aurelien DARRAGON 2023-09-14 11:41:46 +02:00 committed by Christopher Faulet
parent cb01da8d12
commit ec770b7924

View File

@ -830,7 +830,7 @@ static struct sink *sink_new_ringbuf(const char *id, const char *description,
p->conf.args.line = p->conf.line = linenum; p->conf.args.line = p->conf.line = linenum;
sink = sink_new_buf(id, description, LOG_FORMAT_RAW, BUFSIZE); 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); memprintf(err_msg, "unable to create a new sink buffer for ring '%s'", id);
goto err; goto err;
} }