]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: sink: remove useless check after sink creation
authorAurelien DARRAGON <adarragon@haproxy.com>
Thu, 14 Sep 2023 09:41:46 +0000 (11:41 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 6 Oct 2023 13:34:31 +0000 (15:34 +0200)
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

index e031398c83358ee76d9aa093cd2e9728a8e52f9e..4b458279ecebf4914d04635ab9b67e731b867405 100644 (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;
 
        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;
        }