[master] e470f9177 Remove an old fall-back to stdout which has not been used for approx 15 years.

Poul-Henning Kamp phk at FreeBSD.org
Tue Aug 10 07:28:09 UTC 2021


commit e470f91775fc49d17b129fa1652ae17fe50d92ee
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Tue Aug 10 07:13:07 2021 +0000

    Remove an old fall-back to stdout which has not been used for approx 15 years.

diff --git a/lib/libvarnish/vcli_serve.c b/lib/libvarnish/vcli_serve.c
index 2fc7dfe5b..1dcbb7da5 100644
--- a/lib/libvarnish/vcli_serve.c
+++ b/lib/libvarnish/vcli_serve.c
@@ -638,16 +638,13 @@ VCLI_Out(struct cli *cli, const char *fmt, ...)
 {
 	va_list ap;
 
+	AN(cli);
 	va_start(ap, fmt);
-	if (cli != NULL) {
-		CHECK_OBJ_NOTNULL(cli, CLI_MAGIC);
-		if (VSB_len(cli->sb) < *cli->limit)
-			(void)VSB_vprintf(cli->sb, fmt, ap);
-		else if (cli->result == CLIS_OK)
-			cli->result = CLIS_TRUNCATED;
-	} else {
-		(void)vfprintf(stdout, fmt, ap);
-	}
+	CHECK_OBJ_NOTNULL(cli, CLI_MAGIC);
+	if (VSB_len(cli->sb) < *cli->limit)
+		(void)VSB_vprintf(cli->sb, fmt, ap);
+	else if (cli->result == CLIS_OK)
+		cli->result = CLIS_TRUNCATED;
 	va_end(ap);
 }
 


More information about the varnish-commit mailing list