[Pkg-gnupg-commit] [gnupg2] 97/116: gpg: Fix misleading log message when checking regexp.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Tue Jan 24 04:40:58 UTC 2017


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch master
in repository gnupg2.

commit a85731ada2d361eacddc5ae92f80d34792dd4b5e
Author: Damien Goutte-Gattat <dgouttegattat at incenp.org>
Date:   Tue Jan 17 20:42:09 2017 +0100

    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 at incenp.org>
---
 g10/trustdb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/g10/trustdb.c b/g10/trustdb.c
index c113b7e..75714ab 100644
--- a/g10/trustdb.c
+++ b/g10/trustdb.c
@@ -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);
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git



More information about the Pkg-gnupg-commit mailing list