From 76ece3236237626450838b2fb18d5ca213549f51 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Mon, 8 Feb 2016 16:37:21 +0000 Subject: [PATCH] captivectrl: Skip all lines that start with # Signed-off-by: Michael Tremer --- src/misc-progs/captivectrl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/misc-progs/captivectrl.c b/src/misc-progs/captivectrl.c index 9479bc6a54..4d0059290b 100644 --- a/src/misc-progs/captivectrl.c +++ b/src/misc-progs/captivectrl.c @@ -71,6 +71,10 @@ static client_t* read_clients(char* filename) { if (line[strlen(line) - 1] == '\n') line[strlen(line) - 1] = '\0'; + // Skip all commented lines + if (*line == '#') + continue; + client_curr = (client_t*)malloc(sizeof(client_t)); memset(client_curr, 0, sizeof(client_t)); -- 2.39.5