v4l-utils: ir-keytable file parsing errors
authorChris Pockele <chris.pockele.f1@gmail.com>
Sun, 8 Jan 2012 22:31:35 +0000 (22:31 +0000)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 23 Jan 2012 18:25:26 +0000 (16:25 -0200)
commita3b4e693fe28b3ac6aa1ec892661a61779a76ffe
treef5c147ca2081f85678236e948dddbddb9937a7fe
parentcd076e9a91fea0d48a4b259dee78606c9ebcb6fe
v4l-utils: ir-keytable file parsing errors

While configuring a remote control I noticed that the ir-keytable
utility would throw the message "Invalid parameter on line 1" if the
first line following the "table ... type: ..." line is a comment.
Also, if a configuration line is invalid, the line number indication
of the error message is sometimes incorrect, because the comments
before it are not counted.
This happens because of the "continue" statement when processing
comments (or the table/type line), thus skipping the line counter
increase at the end of the loop.  The included patch fixes both
problems by making sure the counter is always increased.
The parse_cfgfile() function had a similar problem.

Signed-off-by: Chris Pockelé <chris.pockele.f1@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
utils/keytable/keytable.c