]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Use PRIu32 instead of %d or %u
authorRoy Marples <roy@marples.name>
Fri, 31 May 2013 14:14:52 +0000 (14:14 +0000)
committerRoy Marples <roy@marples.name>
Fri, 31 May 2013 14:14:52 +0000 (14:14 +0000)
dhcp.c
dhcp6.c
ipv6.c

diff --git a/dhcp.c b/dhcp.c
index 0eb5390b3d14d9e34ba5ea83bfcd454ce47b3fd1..43bd336ef93e12608f510184741e4689b4dd9ebc 100644 (file)
--- a/dhcp.c
+++ b/dhcp.c
@@ -1685,7 +1685,8 @@ dhcp_renew(void *arg)
 
        syslog(LOG_DEBUG, "%s: renewing lease of %s",
            ifp->name, inet_ntoa(lease->addr));
-       syslog(LOG_DEBUG, "%s: rebind in %u seconds, expire in %u seconds",
+       syslog(LOG_DEBUG, "%s: rebind in %"PRIu32" seconds,"
+           " expire in %"PRIu32" seconds",
            ifp->name, lease->rebindtime - lease->renewaltime,
            lease->leasetime - lease->renewaltime);
        state->state = DHS_RENEW;
@@ -1702,7 +1703,7 @@ dhcp_rebind(void *arg)
 
        syslog(LOG_WARNING, "%s: failed to renew, attempting to rebind",
            ifp->name);
-       syslog(LOG_DEBUG, "%s: expire in %u seconds",
+       syslog(LOG_DEBUG, "%s: expire in %"PRIu32" seconds",
            ifp->name, lease->leasetime - lease->rebindtime);
        state->state = DHS_REBIND;
        eloop_timeout_delete(send_renew, ifp);
@@ -1711,6 +1712,7 @@ dhcp_rebind(void *arg)
        send_rebind(ifp);
 }
 
+
 void
 dhcp_bind(void *arg)
 {
@@ -1775,7 +1777,7 @@ dhcp_bind(void *arg)
                                lease->rebindtime = lease->leasetime * T2;
                                syslog(LOG_WARNING,
                                    "%s: rebind time greater than lease "
-                                   "time, forcing to %u seconds",
+                                   "time, forcing to %"PRIu32" seconds",
                                    iface->name, lease->rebindtime);
                        }
                        if (lease->renewaltime == 0)
@@ -1784,12 +1786,12 @@ dhcp_bind(void *arg)
                                lease->renewaltime = lease->leasetime * T1;
                                syslog(LOG_WARNING,
                                    "%s: renewal time greater than rebind "
-                                   "time, forcing to %u seconds",
+                                   "time, forcing to %"PRIu32" seconds",
                                    iface->name, lease->renewaltime);
                        }
                        syslog(lease->addr.s_addr == state->addr.s_addr ?
                            LOG_DEBUG : LOG_INFO,
-                           "%s: leased %s for %u seconds", iface->name,
+                           "%s: leased %s for %"PRIu32" seconds", iface->name,
                            inet_ntoa(lease->addr), lease->leasetime);
                }
        }
@@ -1817,7 +1819,8 @@ dhcp_bind(void *arg)
                eloop_timeout_add_sec(lease->rebindtime, dhcp_rebind, iface);
                eloop_timeout_add_sec(lease->leasetime, dhcp_expire, iface);
                syslog(LOG_DEBUG,
-                   "%s: renew in %u seconds, rebind in %u seconds",
+                   "%s: renew in %"PRIu32" seconds, rebind in %"PRIu32
+                   " seconds",
                    iface->name, lease->renewaltime, lease->rebindtime);
        }
        ipv4_applyaddr(iface);
diff --git a/dhcp6.c b/dhcp6.c
index f1cb6ed9454ca66db106d8c60ad3613fb4101996..3c2e23dd31ba397deccb8ded4b9c6c1b7b072f69 100644 (file)
--- a/dhcp6.c
+++ b/dhcp6.c
@@ -686,7 +686,8 @@ dhcp6_sendmessage(struct interface *ifp, void (*callback)(void *))
                }
 
                syslog(LOG_DEBUG,
-                   "%s: sending %s (xid 0x%02x%02x%02x), next in %0.2f seconds",
+                   "%s: sending %s (xid 0x%02x%02x%02x),"
+                   " next in %0.2f seconds",
                    ifp->name, dhcp6_get_op(state->send->type),
                    state->send->xid[0],
                    state->send->xid[1],
@@ -1910,7 +1911,8 @@ recv:
                ipv6ns_probeaddrs(&state->addrs);
                if (state->renew || state->rebind)
                        syslog(stale ? LOG_DEBUG : LOG_INFO,
-                           "%s: renew in %u seconds, rebind in %u seconds",
+                           "%s: renew in %"PRIu32" seconds,"
+                           " rebind in %"PRIu32" seconds",
                            ifp->name, state->renew, state->rebind);
                ipv6_buildroutes();
                dhcp6_writelease(ifp);
diff --git a/ipv6.c b/ipv6.c
index 94409cacb37718ba2c6cb00857ec4161f86ee291..6b34ea1f0bc281f4953be09075108cac9fd53b23 100644 (file)
--- a/ipv6.c
+++ b/ipv6.c
@@ -250,20 +250,20 @@ ipv6_addaddr(struct ipv6_addr *ap)
        if (ap->prefix_pltime == ND6_INFINITE_LIFETIME &&
            ap->prefix_vltime == ND6_INFINITE_LIFETIME)
                syslog(LOG_DEBUG,
-                   "%s: pltime infinity, vltime infinity",
+                   "%s: vltime infinity, pltime infinity",
                    ap->iface->name);
        else if (ap->prefix_pltime == ND6_INFINITE_LIFETIME)
                syslog(LOG_DEBUG,
-                   "%s: pltime infinity, vltime %d seconds",
+                   "%s: vltime %"PRIu32" seconds, pltime infinity",
                    ap->iface->name, ap->prefix_vltime);
        else if (ap->prefix_vltime == ND6_INFINITE_LIFETIME)
                syslog(LOG_DEBUG,
-                   "%s: pltime %d seconds, vltime infinity",
+                   "%s: vltime infinity, pltime %"PRIu32"seconds",
                    ap->iface->name, ap->prefix_pltime);
        else
                syslog(LOG_DEBUG,
-                   "%s: pltime %d seconds, vltime %d seconds",
-                   ap->iface->name, ap->prefix_pltime, ap->prefix_vltime);
+                   "%s: vltime %"PRIu32" seconds, pltime %"PRIu32" seconds",
+                   ap->iface->name, ap->prefix_vltime, ap->prefix_pltime);
        return 0;
 }