[git] GnuPG - branch, master, updated. gnupg-2.1.15-209-g4aadc75

by Justus Winter cvs at cvs.gnupg.org
Thu Oct 6 14:53:19 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  4aadc751f201f8f97c9c1f454e3a29803cce3edb (commit)
       via  b0d2526bc4e5c663eeffe04500420c70cee98712 (commit)
       via  73000d1ce0317210f5a9e5262404cc90258041ff (commit)
       via  2d446759bd43ae38fbce9a18c955285ca535bc08 (commit)
       via  6b626824c8e30b41c47724b5ccbf761937499512 (commit)
       via  32f81f56a8be6d13dea0a64d24f52343c7e72c84 (commit)
       via  07cfb3b27a77491eae818d57f6eb660e75fa013f (commit)
      from  8ce800d21919eaaba7ed4f04f712292be310fd66 (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 4aadc751f201f8f97c9c1f454e3a29803cce3edb
Author: Justus Winter <justus at g10code.com>
Date:   Thu Oct 6 14:48:52 2016 +0200

    common: Avoid pointer arithmetic on string literals.
    
    * common/gettime.c (rfctimestamp): Use indexing instead.
    * common/signal.c (got_fatal_signal): Likewise.

diff --git a/common/gettime.c b/common/gettime.c
index 9702bbc..9c63658 100644
--- a/common/gettime.c
+++ b/common/gettime.c
@@ -740,10 +740,10 @@ rfctimestamp (u32 stamp)
   if (!tp)
     return NULL;
   return xtryasprintf ("%.3s, %02d %.3s %04d %02d:%02d:%02d +0000",
-                       ("SunMonTueWedThuFriSat" + (tp->tm_wday%7)*3),
+                       &"SunMonTueWedThuFriSat"[(tp->tm_wday%7)*3],
                        tp->tm_mday,
-                       ("JanFebMarAprMayJunJulAugSepOctNovDec"
-                        + (tp->tm_mon%12)*3),
+                       &"JanFebMarAprMayJunJulAugSepOctNovDec"
+                       [(tp->tm_mon%12)*3],
                        tp->tm_year + 1900,
                        tp->tm_hour,
                        tp->tm_min,
diff --git a/common/signal.c b/common/signal.c
index b202f0f..9064adc 100644
--- a/common/signal.c
+++ b/common/signal.c
@@ -134,7 +134,7 @@ got_fatal_signal (int sig)
             {
               if (value >= i || ((any || i==1) && !(value/i)))
                 {
-                  (void)write (2, "0123456789"+(value/i), 1);
+                  (void)write (2, &"0123456789"[value/i], 1);
                   if ((value/i))
                     any = 1;
                   value %= i;

commit b0d2526bc4e5c663eeffe04500420c70cee98712
Author: Justus Winter <justus at g10code.com>
Date:   Thu Oct 6 14:33:20 2016 +0200

    g10: Fix singular term.
    
    * g10/tofu.c (ask_about_binding): Fix singular message.
    
    Signed-off-by: Justus Winter <justus at g10code.com>

diff --git a/g10/tofu.c b/g10/tofu.c
index 5b01c27..c100c43 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 days.",
+                es_fprintf (fp, ngettext(" over the past day.",
                                          " over the past %d days.",
                                          seen_in_past),
                             TIME_AGO_SMALL_THRESHOLD

commit 73000d1ce0317210f5a9e5262404cc90258041ff
Author: Justus Winter <justus at g10code.com>
Date:   Thu Oct 6 14:32:10 2016 +0200

    g10: Use appropriate variant of 'abs'.
    
    * g10/tofu.c (ask_about_binding): Use 'labs' instead of 'abs'.
    
    Signed-off-by: Justus Winter <justus at g10code.com>

diff --git a/g10/tofu.c b/g10/tofu.c
index 1bd8ce2..5b01c27 100644
--- a/g10/tofu.c
+++ b/g10/tofu.c
@@ -1588,7 +1588,7 @@ ask_about_binding (ctrl_t ctrl,
               seen_in_past = 0;
             }
 
-          if (abs(stats_iter->time_ago) == 1)
+          if (labs(stats_iter->time_ago) == 1)
             {
               /* The 1 in this case is the NULL entry.  */
               log_assert (stats_iter->count == 1);
@@ -1610,7 +1610,7 @@ ask_about_binding (ctrl_t ctrl,
 
           if (!stats_iter->count)
             es_fputs (".", fp);
-          else if (abs(stats_iter->time_ago) == 2)
+          else if (labs(stats_iter->time_ago) == 2)
             {
               es_fprintf (fp, "in the future.");
               /* Reset it.  */
@@ -1618,25 +1618,25 @@ ask_about_binding (ctrl_t ctrl,
             }
           else
             {
-              if (abs(stats_iter->time_ago) == 3)
+              if (labs(stats_iter->time_ago) == 3)
                 es_fprintf (fp, ngettext(" over the past days.",
                                          " over the past %d days.",
                                          seen_in_past),
                             TIME_AGO_SMALL_THRESHOLD
                             / TIME_AGO_UNIT_SMALL);
-              else if (abs(stats_iter->time_ago) == 4)
+              else if (labs(stats_iter->time_ago) == 4)
                 es_fprintf (fp, ngettext(" over the past month.",
                                          " over the past %d months.",
                                          seen_in_past),
                             TIME_AGO_MEDIUM_THRESHOLD
                             / TIME_AGO_UNIT_MEDIUM);
-              else if (abs(stats_iter->time_ago) == 5)
+              else if (labs(stats_iter->time_ago) == 5)
                 es_fprintf (fp, ngettext(" over the past year.",
                                          " over the past %d years.",
                                          seen_in_past),
                             TIME_AGO_LARGE_THRESHOLD
                             / TIME_AGO_UNIT_LARGE);
-              else if (abs(stats_iter->time_ago) == 6)
+              else if (labs(stats_iter->time_ago) == 6)
                 es_fprintf (fp, _(" in the past."));
               else
                 log_assert (! "Broken SQL.\n");

commit 2d446759bd43ae38fbce9a18c955285ca535bc08
Author: Justus Winter <justus at g10code.com>
Date:   Thu Oct 6 14:30:56 2016 +0200

    sm: Remove statement without effect.
    
    * sm/call-dirmngr.c (gpgsm_dirmngr_isvalid): Remove statement without
    effect.
    
    Signed-off-by: Justus Winter <justus at g10code.com>

diff --git a/sm/call-dirmngr.c b/sm/call-dirmngr.c
index 91f0c2f..f561bb0 100644
--- a/sm/call-dirmngr.c
+++ b/sm/call-dirmngr.c
@@ -559,7 +559,6 @@ gpgsm_dirmngr_isvalid (ctrl_t ctrl,
                         isvalid_status_cb, &stparm);
   if (opt.verbose > 1)
     log_info ("response of dirmngr: %s\n", rc? gpg_strerror (rc): "okay");
-  rc = rc;
 
   if (!rc && stparm.seen)
     {

commit 6b626824c8e30b41c47724b5ccbf761937499512
Author: Justus Winter <justus at g10code.com>
Date:   Thu Oct 6 14:17:55 2016 +0200

    g10: Fix testing for debug flag.
    
    * g10/parse-packet.c (set_packet_list_mode): Fix testing for debug
    flag.
    
    Signed-off-by: Justus Winter <justus at g10code.com>

diff --git a/g10/parse-packet.c b/g10/parse-packet.c
index 9a733b5..86c2be4 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 (opt.debug & DBG_MPI_VALUE)
         mpi_print_mode = 1;
     }
   return old;

commit 32f81f56a8be6d13dea0a64d24f52343c7e72c84
Author: Justus Winter <justus at g10code.com>
Date:   Thu Oct 6 14:17:03 2016 +0200

    tools: Improve error handling.
    
    * tools/gpg-wks-server.c (copy_key_as_binary): Initialize 'argv'.
    
    Signed-off-by: Justus Winter <justus at g10code.com>

diff --git a/tools/gpg-wks-server.c b/tools/gpg-wks-server.c
index 408e3f5..60505ab 100644
--- a/tools/gpg-wks-server.c
+++ b/tools/gpg-wks-server.c
@@ -519,7 +519,7 @@ copy_key_as_binary (const char *keyfile, const char *outfile,
 {
   gpg_error_t err;
   ccparray_t ccp;
-  const char **argv;
+  const char **argv = NULL;
   char *filterexp = NULL;
 
   if (addrspec)

commit 07cfb3b27a77491eae818d57f6eb660e75fa013f
Author: Justus Winter <justus at g10code.com>
Date:   Thu Oct 6 14:13:18 2016 +0200

    gpgscm: Update callsite of 'gnupg_spawn_process'.
    
    * tests/gpgscm/ffi.c (do_spawn_process): Adapt to the changes to
    'gnupg_spawn_process'.
    
    Fixes-commit: 44a32455
    Fixes-commit: 96c7901e
    Signed-off-by: Justus Winter <justus at g10code.com>

diff --git a/tests/gpgscm/ffi.c b/tests/gpgscm/ffi.c
index 829384a..44db6bb 100644
--- a/tests/gpgscm/ffi.c
+++ b/tests/gpgscm/ffi.c
@@ -653,7 +653,7 @@ do_spawn_process (scheme *sc, pointer args)
     }
 
   err = gnupg_spawn_process (argv[0], (const char **) &argv[1],
-                             GPG_ERR_SOURCE_DEFAULT,
+                             NULL,
                              NULL,
                              flags,
                              &infp, &outfp, &errfp, &pid);

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

Summary of changes:
 common/gettime.c       |  6 +++---
 common/signal.c        |  2 +-
 g10/parse-packet.c     |  2 +-
 g10/tofu.c             | 14 +++++++-------
 sm/call-dirmngr.c      |  1 -
 tests/gpgscm/ffi.c     |  2 +-
 tools/gpg-wks-server.c |  2 +-
 7 files changed, 14 insertions(+), 15 deletions(-)


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




More information about the Gnupg-commits mailing list