[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
eqin comments differ from implementation
From: |
arno formella |
Subject: |
eqin comments differ from implementation |
Date: |
Thu, 15 Dec 2011 10:00:18 +0100 |
Hi,
using indent 2.2.10 I observed that the break-function-decl-args-end
long option was not recognized well.
digging into the source I found that the comment of function "eqin"
says that "true" is returned when the two argument strings are equal,
however, its implementation returns "true" whenever the first argument
is a prefix of the second one, which explains the observed behavior.
suggestion: insert the line
if(*s2) return false;
just before asigning the value to achieve what I guess was intented.
(every pair of options but the two
"break-function-decl-args"-"break-function-decl-args-end" and
"dont-"break-function-decl-args"-"dont-break-function-decl-args-end"
are prefix-free, which give a hint why the bug has been hidden for years :-).
best regards
Arno Formella
PS. remember the saying from Norm Schryer:
"If the code and comments disagree, both are probably wrong".
- eqin comments differ from implementation,
arno formella <=