[git] GnuPG - branch, master, updated. gnupg-2.1.15-212-g1a24c67

by Werner Koch cvs at cvs.gnupg.org
Fri Oct 7 08:10:06 CEST 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".

The branch, master has been updated
       via  1a24c67e20e6ccc6c8e37403a26c715c0f1b6216 (commit)
       via  5d43d28aa3c44c3a27fde823f467b0c4be1a58c2 (commit)
      from  fc0b392e766af8127094e8b529d25abb84ad1d65 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 1a24c67e20e6ccc6c8e37403a26c715c0f1b6216
Author: Werner Koch <wk at gnupg.org>
Date:   Fri Oct 7 07:59:21 2016 +0200

    Revert "g10: Fix singular term."
    
    --
    
    This reverts commit b0d2526bc4e5c663eeffe04500420c70cee98712.
    
    The number of format elements may not change in ngettext.  The entire
    construct is anyway wrong because ngettext is passed a different value
    than what is used in the printf.
    
    We need to rework the use of most strings in tofu.c.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/g10/tofu.c b/g10/tofu.c
index c100c43..5b01c27 100644
--- a/g10/tofu.c
+++ b/g10/tofu.c
@@ -1619,7 +1619,7 @@ ask_about_binding (ctrl_t ctrl,
           else
             {
               if (labs(stats_iter->time_ago) == 3)
-                es_fprintf (fp, ngettext(" over the past day.",
+                es_fprintf (fp, ngettext(" over the past days.",
                                          " over the past %d days.",
                                          seen_in_past),
                             TIME_AGO_SMALL_THRESHOLD

commit 5d43d28aa3c44c3a27fde823f467b0c4be1a58c2
Author: Werner Koch <wk at gnupg.org>
Date:   Fri Oct 7 07:54:38 2016 +0200

    gpg: Put extra parens around bit tests.
    
    * g10/options.h (DBG_MPI): New.
    * g10/gpg.c (set_debug): Use macro or extra parens for binary operator.
    * g10/parse-packet.c (set_packet_list_mode): Use dbg macro.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/doc/HACKING b/doc/HACKING
index bb04fdf..e717479 100644
--- a/doc/HACKING
+++ b/doc/HACKING
@@ -174,6 +174,8 @@ Note that such a comment will be removed if the git commit option
     indicate a problem with the code.
   - Never init static or file local variables to 0 to make sure they
     end up in BSS.
+  - But extra parenthesis around terms with binary operators to make
+    it clear that the binary operator was indeed intended.
   - Use --enable-maintainer-mode with configure so that all suitable
     warnings are enabled.
 
diff --git a/g10/gpg.c b/g10/gpg.c
index 2d5b4ff..9ffce48 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -1190,15 +1190,15 @@ set_debug (const char *level)
       g10_exit (2);
     }
 
-  if (opt.debug & DBG_MEMORY_VALUE )
+  if ((opt.debug & DBG_MEMORY_VALUE))
     memory_debug_mode = 1;
-  if (opt.debug & DBG_MEMSTAT_VALUE )
+  if ((opt.debug & DBG_MEMSTAT_VALUE))
     memory_stat_debug_mode = 1;
-  if (opt.debug & DBG_MPI_VALUE)
+  if (DBG_MPI)
     gcry_control (GCRYCTL_SET_DEBUG_FLAGS, 2);
-  if (opt.debug & DBG_CRYPTO_VALUE )
+  if (DBG_CRYPTO)
     gcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1);
-  if (opt.debug & DBG_IOBUF_VALUE )
+  if ((opt.debug & DBG_IOBUF_VALUE))
     iobuf_debug_mode = 1;
   gcry_control (GCRYCTL_SET_VERBOSITY, (int)opt.verbose);
 
diff --git a/g10/options.h b/g10/options.h
index 544be60..43dfd99 100644
--- a/g10/options.h
+++ b/g10/options.h
@@ -305,6 +305,7 @@ struct {
 
 /* Tests for the debugging flags.  */
 #define DBG_PACKET (opt.debug & DBG_PACKET_VALUE)
+#define DBG_MPI    (opt.debug & DBG_MPI_VALUE)
 #define DBG_CRYPTO (opt.debug & DBG_CRYPTO_VALUE)
 #define DBG_FILTER (opt.debug & DBG_FILTER_VALUE)
 #define DBG_CACHE  (opt.debug & DBG_CACHE_VALUE)
@@ -317,7 +318,7 @@ struct {
 #define DBG_LOOKUP  (opt.debug & DBG_LOOKUP_VALUE)
 #define DBG_EXTPROG (opt.debug & DBG_EXTPROG_VALUE)
 
-/* FIXME: We need to check whey we did not put this into opt. */
+/* FIXME: We need to check why we did not put this into opt. */
 #define DBG_MEMORY    memory_debug_mode
 #define DBG_MEMSTAT   memory_stat_debug_mode
 
diff --git a/g10/parse-packet.c b/g10/parse-packet.c
index 86c2be4..bda3e14 100644
--- a/g10/parse-packet.c
+++ b/g10/parse-packet.c
@@ -220,7 +220,7 @@ set_packet_list_mode (int mode)
       else
         listfp = es_stderr;
 
-      if (opt.debug & DBG_MPI_VALUE)
+      if (DBG_MPI)
         mpi_print_mode = 1;
     }
   return old;

-----------------------------------------------------------------------

Summary of changes:
 doc/HACKING        |  2 ++
 g10/gpg.c          | 10 +++++-----
 g10/options.h      |  3 ++-
 g10/parse-packet.c |  2 +-
 g10/tofu.c         |  2 +-
 5 files changed, 11 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list