aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2021-10-22 10:56:54 -0700
committerFlorin Coras <florin.coras@gmail.com>2021-10-22 17:53:30 +0000
commitac306bd4c6279e8fc2e1cc9299a2c7592b740c5a (patch)
tree6d61b1c641c228790b875c6f3888db13d1691119
parent98008bcf7631cf19602ebd9b706ef9616fc1463f (diff)
vcl: fix cfg parser handling of empty lines
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ibef04947c3a2f4e700233157d581ed54558b51ed
-rw-r--r--src/vcl/vcl_cfg.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vcl/vcl_cfg.c b/src/vcl/vcl_cfg.c
index 1d8407b5177..2ac9eddb6a8 100644
--- a/src/vcl/vcl_cfg.c
+++ b/src/vcl/vcl_cfg.c
@@ -252,6 +252,8 @@ vppcom_cfg_read_file (char *conf_fname)
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
{
+ /* skip empty newlines as they confuse unformat_line_input */
+ unformat_skip_white_space (input);
(void) unformat_user (input, unformat_line_input, line_input);
unformat_skip_white_space (line_input);