From: Vincent Bernat Date: Tue, 14 Oct 2014 16:11:47 +0000 (+0200) Subject: lldpcli: don't complain when reading a commented line X-Git-Tag: 0.7.12~23 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6d2c29c781db241f8f162398b4063eab53f78532;p=thirdparty%2Flldpd.git lldpcli: don't complain when reading a commented line Since we ship a default configuration file with only a comment, this was annoying. --- diff --git a/NEWS b/NEWS index e8a9008b..094e729f 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,7 @@ +lldpd (0.7.12) + * Fix: + + Don't complain when parsing a commented line + lldpd (0.7.11) * Features: + Ship bash and zsh completion. diff --git a/src/client/lldpcli.c b/src/client/lldpcli.c index 8eeac70e..ef565c71 100644 --- a/src/client/lldpcli.c +++ b/src/client/lldpcli.c @@ -494,7 +494,8 @@ main(int argc, char *argv[]) line = strndup(line, len); if (line[len - 1] == '\n') { line[len - 1] = '\0'; - parse_and_exec(conn, fmt, line); + if (line[0] != '#') + parse_and_exec(conn, fmt, line); } free(line); }