]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
2081. [port] libbind: minor 64-bit portability fix in memcluster.c.
authorMark Andrews <marka@isc.org>
Wed, 30 Aug 2006 23:34:38 +0000 (23:34 +0000)
committerMark Andrews <marka@isc.org>
Wed, 30 Aug 2006 23:34:38 +0000 (23:34 +0000)
                        [RT #16360]

CHANGES
lib/bind/isc/memcluster.c

diff --git a/CHANGES b/CHANGES
index 911016856800593d9ee4e57cb76bcaa4c02c5c91..144f9fd55da7d42e7c3e27b9d6c4075d909c711a 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+2081.  [port]          libbind: minor 64-bit portability fix in memcluster.c.
+                       [RT #16360]
+
 2080.  [port]          libbind: res_init.c did not compile on older versions
                        of Solaris. [RT #16363]
 
index 72a54aa305aeed2f4e6a145ca1498a2531ae589e..515793fd6ab8f06cbaecc885d99467844bae61a2 100644 (file)
@@ -24,7 +24,7 @@
 
 
 #if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "$Id: memcluster.c,v 1.10 2005/10/11 00:10:14 marka Exp $";
+static const char rcsid[] = "$Id: memcluster.c,v 1.11 2006/08/30 23:34:38 marka Exp $";
 #endif /* not lint */
 
 #include "port_before.h"
@@ -399,7 +399,7 @@ __memput_record(void *mem, size_t size, const char *file, int line) {
        p = (char *)e + sizeof *e + size;
        memcpy(&fp, p, sizeof fp);
        INSIST(fp == BACK_FENCEPOST);
-       INSIST(((int)mem % 4) == 0);
+       INSIST(((u_long)mem % 4) == 0);
 #ifdef MEMCLUSTER_RECORD
        prev = NULL;
        if (size == max_size || new_size >= max_size)
@@ -523,10 +523,11 @@ memstats(FILE *out) {
        for (i = 1; i <= max_size; i++) {
                if ((e = activelists[i]) != NULL)
                        while (e != NULL) {
-                               fprintf(out, "%s:%d %p:%d\n",
+                               fprintf(out, "%s:%d %p:%lu\n",
                                        e->file != NULL ? e->file :
                                                "<UNKNOWN>", e->line,
-                                       (char *)e + sizeof *e, e->size);
+                                       (char *)e + sizeof *e,
+                                       (u_long)e->size);
                                e = e->next;
                        }
        }