From: Roy Marples Date: Fri, 31 May 2013 14:14:52 +0000 (+0000) Subject: Use PRIu32 instead of %d or %u X-Git-Tag: v5.99.7~18 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=be2aae010d75d08135583a0388d8ce1c82e99370;p=thirdparty%2Fdhcpcd.git Use PRIu32 instead of %d or %u --- diff --git a/dhcp.c b/dhcp.c index 0eb5390b..43bd336e 100644 --- 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 f1cb6ed9..3c2e23dd 100644 --- 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 94409cac..6b34ea1f 100644 --- 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; }