[git] GnuPG - branch, master, updated. gnupg-2.1.17-28-ga1e0d4a

by Justus Winter cvs at cvs.gnupg.org
Mon Jan 2 18:24:40 CET 2017


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  a1e0d4a1e75fc6e6c3392a4e1d1d27005b38d6cc (commit)
       via  6d065198337b5242889723481bfa9ce81aa108bb (commit)
      from  5b6ebfb9244602d9de31d61c7eceb0c45ac8aa49 (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 a1e0d4a1e75fc6e6c3392a4e1d1d27005b38d6cc
Author: Justus Winter <justus at g10code.com>
Date:   Mon Jan 2 16:30:45 2017 +0100

    common: Turn assertions into expressions.
    
    * common/logging.h (log_assert): Turn this into an expression so it
    can be used in expressions.
    
    Signed-off-by: Justus Winter <justus at g10code.com>

diff --git a/common/logging.h b/common/logging.h
index 64b999d..fc9e846 100644
--- a/common/logging.h
+++ b/common/logging.h
@@ -56,18 +56,18 @@ estream_t log_get_stream (void);
   void _log_assert (const char *expr, const char *file, int line,
                     const char *func) GPGRT_ATTR_NORETURN;
 # define BUG() bug_at( __FILE__ , __LINE__, __FUNCTION__)
-# define log_assert(expr)    do {                               \
-    if (!(expr))                                                \
-      _log_assert (#expr, __FILE__, __LINE__, __FUNCTION__);    \
-  } while (0)
+# define log_assert(expr)                                       \
+  ((expr)                                                       \
+   ? (void) 0                                                   \
+   : _log_assert (#expr, __FILE__, __LINE__, __FUNCTION__))
 #else /*!GPGRT_HAVE_MACRO_FUNCTION*/
   void bug_at (const char *file, int line);
   void _log_assert (const char *expr, const char *file, int line;
 # define BUG() bug_at( __FILE__ , __LINE__ )
-# define log_assert(expr)    do {                               \
-    if (!(expr))                                                \
-      _log_assert (#expr, __FILE__, __LINE__);                  \
-  } while (0)
+# define log_assert(expr)                                       \
+  ((expr)                                                       \
+   ? (void) 0                                                   \
+   : _log_assert (#expr, __FILE__, __LINE__))
 #endif /*!GPGRT_HAVE_MACRO_FUNCTION*/
 
 /* Flag values for log_set_prefix. */

commit 6d065198337b5242889723481bfa9ce81aa108bb
Author: Justus Winter <justus at g10code.com>
Date:   Mon Jan 2 16:37:02 2017 +0100

    tests: Fix faked time in the TOFU test.
    
    * tests/openpgp/tofu.scm (GPG): Fix time delta.
    
    Signed-off-by: Justus Winter <justus at g10code.com>

diff --git a/tests/openpgp/tofu.scm b/tests/openpgp/tofu.scm
index 20c130a..cfcd5c8 100755
--- a/tests/openpgp/tofu.scm
+++ b/tests/openpgp/tofu.scm
@@ -29,7 +29,7 @@
 (define (days->seconds days) (* days 24 60 60))
 
 ;; Redefine GPG without --always-trust and a fixed time.
-(define GPG `(,(tool 'gpg) --no-permission-warning ,(faketime GPGTIME)))
+(define GPG `(,(tool 'gpg) --no-permission-warning ,(faketime 0)))
 (define GNUPGHOME (getenv "GNUPGHOME"))
 (if (string=? "" GNUPGHOME)
     (fail "GNUPGHOME not set"))

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

Summary of changes:
 common/logging.h       | 16 ++++++++--------
 tests/openpgp/tofu.scm |  2 +-
 2 files changed, 9 insertions(+), 9 deletions(-)


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




More information about the Gnupg-commits mailing list