gpg: Fix misleading log message when checking regexp.

* src/trustdb.c (check_regexp): Correctly print whether the
regexp matched or not.
--

This patch fixes the log message displayed when gpg attempts to
match the regexp associated with a trust signature with an user ID.
The current message interprets the 'ret' variable backwards, and
displays 'YES' when the regexp actually fails to match.

Signed-off-by: Damien Goutte-Gattat <dgouttegattat@incenp.org>
This commit is contained in:
Damien Goutte-Gattat 2017-01-17 20:42:09 +01:00 committed by Werner Koch
parent 65ed117ac0
commit a85731ada2
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
1 changed files with 2 additions and 2 deletions

View File

@ -1550,14 +1550,14 @@ check_regexp(const char *expr,const char *string)
{
ret=regexec(&pat,string,0,NULL,0);
regfree(&pat);
ret=(ret==0);
}
ret=(ret==0);
}
#endif
if(DBG_TRUST)
log_debug("regexp '%s' ('%s') on '%s': %s\n",
regexp,expr,string,ret==0?"YES":"NO");
regexp,expr,string,ret?"YES":"NO");
xfree(regexp);