From: Michael Tremer Date: Mon, 8 Feb 2016 16:37:21 +0000 (+0000) Subject: captivectrl: Skip all lines that start with # X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dcc2476450b01360801e5b2f58227c75bbff7f99;p=people%2Fms%2Fipfire-2.x.git captivectrl: Skip all lines that start with # Signed-off-by: Michael Tremer --- 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));