mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
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:
parent
65ed117ac0
commit
a85731ada2
@ -1550,14 +1550,14 @@ check_regexp(const char *expr,const char *string)
|
|||||||
{
|
{
|
||||||
ret=regexec(&pat,string,0,NULL,0);
|
ret=regexec(&pat,string,0,NULL,0);
|
||||||
regfree(&pat);
|
regfree(&pat);
|
||||||
ret=(ret==0);
|
|
||||||
}
|
}
|
||||||
|
ret=(ret==0);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(DBG_TRUST)
|
if(DBG_TRUST)
|
||||||
log_debug("regexp '%s' ('%s') on '%s': %s\n",
|
log_debug("regexp '%s' ('%s') on '%s': %s\n",
|
||||||
regexp,expr,string,ret==0?"YES":"NO");
|
regexp,expr,string,ret?"YES":"NO");
|
||||||
|
|
||||||
xfree(regexp);
|
xfree(regexp);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user