[Pkg-gnupg-commit] [gnupg2] 98/124: gpg: Consistent use of preprocessor conditionals.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Wed Apr 5 15:55:36 UTC 2017


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

dkg pushed a commit to branch experimental
in repository gnupg2.

commit 5e89144cbca36c1e7eb814b3aad4b7c46cd4efbf
Author: Justus Winter <justus at g10code.com>
Date:   Thu Mar 30 12:35:18 2017 +0200

    gpg: Consistent use of preprocessor conditionals.
    
    * g10/parse-packet.c: Use '#if' instead of '#ifdef' when checking
    DEBUG_PARSE_PACKET.  This fixes the build with '#define
    DEBUG_PARSE_PACKET 0'.
    
    Signed-off-by: Justus Winter <justus at g10code.com>
---
 g10/parse-packet.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/g10/parse-packet.c b/g10/parse-packet.c
index 793e198..ffed956 100644
--- a/g10/parse-packet.c
+++ b/g10/parse-packet.c
@@ -50,7 +50,7 @@ static estream_t listfp;
 
 static int parse (parse_packet_ctx_t ctx, PACKET *pkt, int onlykeypkts,
 		  off_t * retpos, int *skip, IOBUF out, int do_skip
-#ifdef DEBUG_PARSE_PACKET
+#if DEBUG_PARSE_PACKET
 		  , const char *dbg_w, const char *dbg_f, int dbg_l
 #endif
   );
@@ -261,7 +261,7 @@ unknown_pubkey_warning (int algo)
 }
 
 
-#ifdef DEBUG_PARSE_PACKET
+#if DEBUG_PARSE_PACKET
 int
 dbg_parse_packet (parse_packet_ctx_t ctx, PACKET *pkt,
                   const char *dbg_f, int dbg_l)
@@ -295,7 +295,7 @@ parse_packet (parse_packet_ctx_t ctx, PACKET *pkt)
  * Like parse packet, but only return secret or public (sub)key
  * packets.
  */
-#ifdef DEBUG_PARSE_PACKET
+#if DEBUG_PARSE_PACKET
 int
 dbg_search_packet (parse_packet_ctx_t ctx, PACKET *pkt,
                    off_t * retpos, int with_uid,
@@ -331,7 +331,7 @@ search_packet (parse_packet_ctx_t ctx, PACKET *pkt,
 /*
  * Copy all packets from INP to OUT, thereby removing unused spaces.
  */
-#ifdef DEBUG_PARSE_PACKET
+#if DEBUG_PARSE_PACKET
 int
 dbg_copy_all_packets (iobuf_t inp, iobuf_t out, const char *dbg_f, int dbg_l)
 {
@@ -388,7 +388,7 @@ copy_all_packets (iobuf_t inp, iobuf_t out)
  * Stop at offset STOPoff (i.e. don't copy packets at this or later
  * offsets)
  */
-#ifdef DEBUG_PARSE_PACKET
+#if DEBUG_PARSE_PACKET
 int
 dbg_copy_some_packets (iobuf_t inp, iobuf_t out, off_t stopoff,
 		       const char *dbg_f, int dbg_l)
@@ -448,7 +448,7 @@ copy_some_packets (iobuf_t inp, iobuf_t out, off_t stopoff)
 /*
  * Skip over N packets
  */
-#ifdef DEBUG_PARSE_PACKET
+#if DEBUG_PARSE_PACKET
 int
 dbg_skip_some_packets (iobuf_t inp, unsigned n, const char *dbg_f, int dbg_l)
 {
@@ -524,7 +524,7 @@ skip_some_packets (iobuf_t inp, unsigned int n)
 static int
 parse (parse_packet_ctx_t ctx, PACKET *pkt, int onlykeypkts, off_t * retpos,
        int *skip, IOBUF out, int do_skip
-#ifdef DEBUG_PARSE_PACKET
+#if DEBUG_PARSE_PACKET
        , const char *dbg_w, const char *dbg_f, int dbg_l
 #endif
        )
@@ -747,7 +747,7 @@ parse (parse_packet_ctx_t ctx, PACKET *pkt, int onlykeypkts, off_t * retpos,
 
   if (DBG_PACKET)
     {
-#ifdef DEBUG_PARSE_PACKET
+#if DEBUG_PARSE_PACKET
       log_debug ("parse_packet(iob=%d): type=%d length=%lu%s (%s.%s.%d)\n",
 		 iobuf_id (inp), pkttype, pktlen, new_ctb ? " (new_ctb)" : "",
 		 dbg_w, dbg_f, dbg_l);

-- 
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