format string cleanup: change "%i" to "%d" and fix a few typos
authoreric <eric@openbsd.org>
Tue, 20 May 2014 18:47:01 +0000 (18:47 +0000)
committereric <eric@openbsd.org>
Tue, 20 May 2014 18:47:01 +0000 (18:47 +0000)
usr.sbin/smtpd/mta.c
usr.sbin/smtpd/mta_session.c
usr.sbin/smtpd/scheduler.c
usr.sbin/smtpd/smtpctl.c

index 5744a17..2d3d8be 100644 (file)
@@ -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 <pyr@openbsd.org>
@@ -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);
index 6f5e8c3..4077d67 100644 (file)
@@ -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 <pyr@openbsd.org>
@@ -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:
index ea3649f..e9052e5 100644 (file)
@@ -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 <gilles@poolp.org>
@@ -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();
index a710c4f..0b42365 100644 (file)
@@ -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 <eric@openbsd.org>
@@ -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|");