From: eric Date: Tue, 20 May 2014 18:47:01 +0000 (+0000) Subject: format string cleanup: change "%i" to "%d" and fix a few typos X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=5c9fb78e9f72f1a70bcdb1e91f9fdf346ba04155;p=openbsd format string cleanup: change "%i" to "%d" and fix a few typos --- diff --git a/usr.sbin/smtpd/mta.c b/usr.sbin/smtpd/mta.c index 5744a17af73..2d3d8bee021 100644 --- a/usr.sbin/smtpd/mta.c +++ b/usr.sbin/smtpd/mta.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mta.c,v 1.186 2014/04/19 13:32:07 gilles Exp $ */ +/* $OpenBSD: mta.c,v 1.187 2014/05/20 18:47:01 eric Exp $ */ /* * Copyright (c) 2008 Pierre-Yves Ritschard @@ -227,7 +227,7 @@ mta_imsg(struct mproc *p, struct imsg *imsg) m_add_evpid(p_queue, evp.id); m_add_id(p_queue, relay->id); m_close(p_queue); - mta_relay_unref(relay); + mta_relay_unref(relay); /* from here */ return; } @@ -743,7 +743,7 @@ mta_delivery_flush_event(int fd, short event, void *arg) m_close(p_queue); } else { - log_warnx("warn: bad delivery type %i for %016" PRIx64, + log_warnx("warn: bad delivery type %d for %016" PRIx64, e->delivery, e->id); fatalx("aborting"); } @@ -774,7 +774,7 @@ mta_delivery_log(struct mta_envelope *e, const char *source, const char *relay, else if (delivery == IMSG_MTA_DELIVERY_LOOP) mta_log(e, "PermFail", source, relay, "Loop detected"); else { - log_warnx("warn: bad delivery type %i for %016" PRIx64, + log_warnx("warn: bad delivery type %d for %016" PRIx64, delivery, e->id); fatalx("aborting"); } @@ -1074,7 +1074,7 @@ mta_connect(struct mta_connector *c) } if (c->flags & CONNECTOR_WAIT) { - log_debug("debug: mta: canceling connector timeout"); + log_debug("debug: mta: cancelling connector timeout"); runq_cancel(runq_connector, NULL, c); } @@ -2190,7 +2190,7 @@ mta_connector_free(struct mta_connector *c) mta_connector_to_text(c)); if (c->flags & CONNECTOR_WAIT) { - log_debug("debug: mta: canceling timeout for %s", + log_debug("debug: mta: cancelling timeout for %s", mta_connector_to_text(c)); runq_cancel(runq_connector, NULL, c); } @@ -2234,7 +2234,7 @@ mta_route(struct mta_source *src, struct mta_host *dst) stat_increment("mta.route", 1); } else if (r->flags & ROUTE_RUNQ) { - log_debug("debug: mta: mta_route_ref(): canceling runq for route %s", + log_debug("debug: mta: mta_route_ref(): cancelling runq for route %s", mta_route_to_text(r)); r->flags &= ~(ROUTE_RUNQ | ROUTE_KEEPALIVE); runq_cancel(runq_route, NULL, r); @@ -2297,7 +2297,7 @@ mta_route_unref(struct mta_route *r) return; } - log_debug("debug: mta: ma_route_unref(): really discarding route %s", + log_debug("debug: mta: mta_route_unref(): really discarding route %s", mta_route_to_text(r)); SPLAY_REMOVE(mta_route_tree, &routes, r); diff --git a/usr.sbin/smtpd/mta_session.c b/usr.sbin/smtpd/mta_session.c index 6f5e8c38253..4077d675e7f 100644 --- a/usr.sbin/smtpd/mta_session.c +++ b/usr.sbin/smtpd/mta_session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mta_session.c,v 1.65 2014/05/12 14:37:32 eric Exp $ */ +/* $OpenBSD: mta_session.c,v 1.66 2014/05/20 18:47:01 eric Exp $ */ /* * Copyright (c) 2008 Pierre-Yves Ritschard @@ -840,7 +840,7 @@ mta_enter_state(struct mta_session *s, int newstate) break; } - log_trace(TRACE_MTA, "mta: %p: >>> [...%zi bytes...]", s, q); + log_trace(TRACE_MTA, "mta: %p: >>> [...%zd bytes...]", s, q); break; case MTA_EOM: diff --git a/usr.sbin/smtpd/scheduler.c b/usr.sbin/smtpd/scheduler.c index ea3649f3ec4..e9052e59566 100644 --- a/usr.sbin/smtpd/scheduler.c +++ b/usr.sbin/smtpd/scheduler.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scheduler.c,v 1.44 2014/04/08 15:25:43 eric Exp $ */ +/* $OpenBSD: scheduler.c,v 1.45 2014/05/20 18:47:01 eric Exp $ */ /* * Copyright (c) 2008 Gilles Chehade @@ -229,7 +229,7 @@ scheduler_imsg(struct mproc *p, struct imsg *imsg) m_get_int(&m, &r); m_end(&m); log_trace(TRACE_SCHEDULER, - "scheduler: releasing %d on holdq (%i, %016" PRIx64 ")", + "scheduler: releasing %d on holdq (%d, %016" PRIx64 ")", r, type, holdq); backend->release(type, holdq, r); scheduler_reset_events(); diff --git a/usr.sbin/smtpd/smtpctl.c b/usr.sbin/smtpd/smtpctl.c index a710c4f0e41..0b42365be5c 100644 --- a/usr.sbin/smtpd/smtpctl.c +++ b/usr.sbin/smtpd/smtpctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smtpctl.c,v 1.119 2014/04/22 13:57:58 gilles Exp $ */ +/* $OpenBSD: smtpctl.c,v 1.120 2014/05/20 18:47:01 eric Exp $ */ /* * Copyright (c) 2013 Eric Faurot @@ -959,10 +959,10 @@ show_queue_envelope(struct envelope *e, int online) if (online) { if (e->flags & EF_PENDING) - (void)snprintf(runstate, sizeof runstate, "pending|%zi", + (void)snprintf(runstate, sizeof runstate, "pending|%zd", (ssize_t)(e->nexttry - now)); else if (e->flags & EF_INFLIGHT) - (void)snprintf(runstate, sizeof runstate, "inflight|%zi", + (void)snprintf(runstate, sizeof runstate, "inflight|%zd", (ssize_t)(now - e->lasttry)); else (void)snprintf(runstate, sizeof runstate, "invalid|");