mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
gpg-connect-tool: Take the string "true" as a true condition.
* tools/gpg-connect-agent.c (main): Handle strings "true" and "yes" in conditions as expected.
This commit is contained in:
parent
cf748e8736
commit
2871422d9a
2 changed files with 20 additions and 6 deletions
|
@ -1747,7 +1747,14 @@ main (int argc, char **argv)
|
|||
}
|
||||
tmpline = substitute_line (tmpcond);
|
||||
value = tmpline? tmpline : tmpcond;
|
||||
condition = strtol (value, NULL, 0);
|
||||
/* "true" or "yes" are commonly used to mean TRUE;
|
||||
all other strings will evaluate to FALSE due to
|
||||
the strtoul. */
|
||||
if (!ascii_strcasecmp (value, "true")
|
||||
|| !ascii_strcasecmp (value, "yes"))
|
||||
condition = 1;
|
||||
else
|
||||
condition = strtol (value, NULL, 0);
|
||||
xfree (tmpline);
|
||||
xfree (tmpcond);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue