From: krw Date: Wed, 3 Aug 2016 23:37:25 +0000 (+0000) Subject: Apply a warning fix from lukem@NetBSD circa 1997 (more '()'), and X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=923d97b9105dd055e26ee4ee3b9a23d8df600741;p=openbsd Apply a warning fix from lukem@NetBSD circa 1997 (more '()'), and one from he@NetBSD circa 1998 (more '{}'). Makes gcc happier. --- diff --git a/usr.sbin/mtrace/mtrace.c b/usr.sbin/mtrace/mtrace.c index 7f2c52ea038..b6fc3913c94 100644 --- a/usr.sbin/mtrace/mtrace.c +++ b/usr.sbin/mtrace/mtrace.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mtrace.c,v 1.36 2016/08/03 23:22:48 krw Exp $ */ +/* $OpenBSD: mtrace.c,v 1.37 2016/08/03 23:37:25 krw Exp $ */ /* $NetBSD: mtrace.c,v 1.5 1995/12/10 10:57:15 mycroft Exp $ */ /* @@ -855,7 +855,7 @@ stat_line(struct tr_resp *r, struct tr_resp *s, int have_next, int *rst) v_pps = v_out / timediff; g_pps = g_out / timediff; - if (v_out && (s->tr_vifout != 0xFFFFFFFF && s->tr_vifout != 0) || + if ((v_out && (s->tr_vifout != 0xFFFFFFFF && s->tr_vifout != 0)) || (r->tr_vifout != 0xFFFFFFFF && r->tr_vifout != 0)) have |= OUTS; @@ -1530,7 +1530,7 @@ usage: mtrace [-lMnpsv] [-g gateway] [-i if_addr] [-m max_hops] [-q nqueries]\n\ if (base.rtime == 0) { printf("Timed out receiving responses\n"); - if (IN_MULTICAST(ntohl(tdst))) + if (IN_MULTICAST(ntohl(tdst))) { if (tdst == query_cast) printf("Perhaps no local router has a route for source %s\n", inet_fmt(qsrc, s1)); @@ -1540,6 +1540,7 @@ or no router local to it has a route for source %s,\n\ or multicast at ttl %d doesn't reach its last-hop router for that source\n", inet_fmt(qdst, s2), inet_fmt(qgrp, s3), inet_fmt(qsrc, s1), qttl ? qttl : MULTICAST_TTL1); + } exit(1); }