From: Aurelien DARRAGON Date: Thu, 14 Sep 2023 09:41:46 +0000 (+0200) Subject: MINOR: sink: remove useless check after sink creation X-Git-Tag: v2.9-dev7~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ec770b7924848570c72a4e6d82f612d0c44936b1;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/sink.c b/src/sink.c index e031398c83..4b458279ec 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; }