]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Silence a compiler warning by using #if comparison instead of if. No
authorEvan Hunt <each@isc.org>
Fri, 11 Mar 2011 01:20:39 +0000 (01:20 +0000)
committerEvan Hunt <each@isc.org>
Fri, 11 Mar 2011 01:20:39 +0000 (01:20 +0000)
CHANGES note because it's trivial. [RT #23587]

lib/dns/masterdump.c

index f56ec8097640e9ec37d0d835c899a7d7a1817100..007a9a9a67e435b7858615926d2b5ca3c292fcf5 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: masterdump.c,v 1.101 2011/03/05 23:52:30 tbox Exp $ */
+/* $Id: masterdump.c,v 1.102 2011/03/11 01:20:39 each Exp $ */
 
 /*! \file */
 
@@ -1385,7 +1385,7 @@ dumptostreaminc(dns_dumpctx_t *dctx) {
                        isc_buffer_region(&buffer, &r);
                        isc_buffer_putuint32(&buffer, dns_masterformat_raw);
                        isc_buffer_putuint32(&buffer, DNS_RAWFORMAT_VERSION);
-                       if (sizeof(now32) != sizeof(dctx->now)) {
+#if (sizeof(isc_uint32_t) != sizeof(isc_stdtime_t))
                                /*
                                 * We assume isc_stdtime_t is a 32-bit integer,
                                 * which should be the case on most cases.
@@ -1400,8 +1400,9 @@ dumptostreaminc(dns_dumpctx_t *dctx) {
                                              "dumping master file in raw "
                                              "format: stdtime is not 32bits");
                                now32 = 0;
-                       } else
+#else
                                now32 = dctx->now;
+#endif
                        isc_buffer_putuint32(&buffer, now32);
                        INSIST(isc_buffer_usedlength(&buffer) <=
                               sizeof(rawheader));