]> git.puffer.fish Git - mirror/frr.git/commitdiff
[64-bit] Fix 4 problems with printf formats and 64-bit size_t
authorAndrew J. Schorr <ajschorr@alumni.princeton.edu>
Fri, 27 Apr 2007 18:13:15 +0000 (18:13 +0000)
committerAndrew J. Schorr <ajschorr@alumni.princeton.edu>
Fri, 27 Apr 2007 18:13:15 +0000 (18:13 +0000)
2007-04-27 Andrew J. Schorr <ajschorr@alumni.princeton.edu>

* lib/smux.c: (smux_trap) Fix printf format to work with 64-bit size_t.
* ospf6d/ospf6_snmp.c: (ospfv3AreaEntry, ospfv3AreaLsdbEntry) Fix some
  zlog_debug printf formats to work with 64-bit size_t.

lib/ChangeLog
lib/smux.c
ospf6d/ChangeLog
ospf6d/ospf6_snmp.c

index c58fef297a9c7a4fe26b7208f6b2edca2b99872c..ff32fcceb3c5b6d09320364ac06dd53659a0509a 100644 (file)
@@ -1,3 +1,7 @@
+2007-04-27 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+       * smux.c: (smux_trap) Fix printf format to work with 64-bit size_t.
+
 2007-04-07 Paul Jakma <paul.jakma@sun.com>
 
        * prefix.h: Add define to match IPv4 Link-Local addresses
index 1bec1209b57e2434c2d9a0150cbd8ce0b99ebcf8..8f809c0db4ff86091fc963dd5e936c3626f114c7 100644 (file)
@@ -1091,7 +1091,7 @@ smux_trap (oid *name, size_t namelen,
               smux_oid_dump ("Trap", iname, inamelen);
             }
           smux_oid_dump ("Trap", oid, oid_len);
-          zlog_info ("BUFSIZ: %d // oid_len: %d", BUFSIZ, oid_len);
+          zlog_info ("BUFSIZ: %d // oid_len: %lu", BUFSIZ, (u_long)oid_len);
       }
 
       ret = smux_get (oid, &oid_len, 1, &val_type, &val, &val_len);
index c5f24f7fa20158b171c994a66243c9a0cbc8fb54..4d55a5900e42dad47103f9b3e03e261d24ea3367 100644 (file)
@@ -1,3 +1,8 @@
+2007-04-27 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+       * ospf6_snmp.c: (ospfv3AreaEntry, ospfv3AreaLsdbEntry) Fix some
+         zlog_debug printf formats to work with 64-bit size_t.
+
 2007-03-08 David Siebörger d.sieborger@ru.ac.za
 
        * ospf6_neighbor.c: (ospf6_neighbor_show) Fix bug #322, ospf6d
index 09fa27ce7bfdfe1359c119407e5c76fa326daa12..a1d8d4c97cf8036a14c215a8ac4ac56f1524e477 100644 (file)
@@ -314,9 +314,9 @@ ospfv3AreaEntry (struct variable *v, oid *name, size_t *length,
   if (len)
     oid2in_addr (name + v->namelen, len, (struct in_addr *) &area_id);
 
-  zlog_debug ("SNMP access by area: %s, exact=%d len=%d length=%d",
+  zlog_debug ("SNMP access by area: %s, exact=%d len=%d length=%lu",
              inet_ntoa (* (struct in_addr *) &area_id),
-             exact, len, *length);
+             exact, len, (u_long)*length);
 
   for (ALL_LIST_ELEMENTS_RO (ospf6->area_list, node, oa))
     {
@@ -338,9 +338,9 @@ ospfv3AreaEntry (struct variable *v, oid *name, size_t *length,
   oid_copy_addr (name + v->namelen, (struct in_addr *) &area->area_id,
                  sizeof (u_int32_t));
 
-  zlog_debug ("SNMP found area: %s, exact=%d len=%d length=%d",
+  zlog_debug ("SNMP found area: %s, exact=%d len=%d length=%lu",
              inet_ntoa (* (struct in_addr *) &area->area_id),
-             exact, len, *length);
+             exact, len, (u_long)*length);
 
   switch (v->magic)
     {
@@ -423,9 +423,9 @@ ospfv3AreaLsdbEntry (struct variable *v, oid *name, size_t *length,
   inet_ntop (AF_INET, &area_id, a, sizeof (a));
   inet_ntop (AF_INET, &adv_router, b, sizeof (b));
   inet_ntop (AF_INET, &id, c, sizeof (c));
-  zlog_debug ("SNMP access by lsdb: area=%s exact=%d length=%d magic=%d"
+  zlog_debug ("SNMP access by lsdb: area=%s exact=%d length=%lu magic=%d"
              " type=%#x adv_router=%s id=%s",
-             a, exact, *length, v->magic, ntohs (type), b, c);
+             a, exact, (u_long)*length, v->magic, ntohs (type), b, c);
 
   if (exact)
     {