diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2016-12-25 16:40:07 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2016-12-25 16:40:07 +0000 |
commit | 4d7ee92b6b09fb9aa7f3e6131f28f10991844f22 (patch) | |
tree | eada6b7b8cb474b224be48d1a8a4b800b3393a2f | |
parent | 5ceb7d5c067f6a10d018b2cb579f13da91da653e (diff) |
Add some {}'s to eliminate "ambiguous else" warnings from gcc.
ok tb@ millert@
-rw-r--r-- | usr.bin/lex/main.c | 5 | ||||
-rw-r--r-- | usr.sbin/mopd/common/dl.c | 5 | ||||
-rw-r--r-- | usr.sbin/mrouted/prune.c | 9 |
3 files changed, 12 insertions, 7 deletions
diff --git a/usr.bin/lex/main.c b/usr.bin/lex/main.c index 15a1953afe2..6e2899df063 100644 --- a/usr.bin/lex/main.c +++ b/usr.bin/lex/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.25 2015/12/11 00:08:43 mmcc Exp $ */ +/* $OpenBSD: main.c,v 1.26 2016/12/25 16:40:06 krw Exp $ */ /* flex - tool to generate fast lexical analyzers */ @@ -1550,11 +1550,12 @@ readin() //outn("\n#define YY_USES_REJECT"); } if (!do_yywrap) { - if (!C_plus_plus) + if (!C_plus_plus) { if (reentrant) outn("\n#define yywrap(yyscanner) 1"); else outn("\n#define yywrap() 1"); + } outn("#define YY_SKIP_YYWRAP"); } if (ddebug) diff --git a/usr.sbin/mopd/common/dl.c b/usr.sbin/mopd/common/dl.c index 87cf6b87e28..76baa16fd83 100644 --- a/usr.sbin/mopd/common/dl.c +++ b/usr.sbin/mopd/common/dl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dl.c,v 1.8 2009/10/27 23:59:52 deraadt Exp $ */ +/* $OpenBSD: dl.c,v 1.9 2016/12/25 16:40:06 krw Exp $ */ /* * Copyright (c) 1993-95 Mats O Jansson. All rights reserved. @@ -96,7 +96,7 @@ mopDumpDL(FILE *fd, u_char *pkt, int trans) if (moplen > 6) { for (i = 0; i < (moplen - 6); i++) { - if ((i % 16) == 0) + if ((i % 16) == 0) { if ((i / 16) == 0) fprintf(fd, "Image Data : %04x ", @@ -104,6 +104,7 @@ mopDumpDL(FILE *fd, u_char *pkt, int trans) else fprintf(fd, " "); + } fprintf(fd, "%02x ", mopGetChar(pkt, &idx)); if ((i % 16) == 15) diff --git a/usr.sbin/mrouted/prune.c b/usr.sbin/mrouted/prune.c index 7e8bebad614..f250d22aca8 100644 --- a/usr.sbin/mrouted/prune.c +++ b/usr.sbin/mrouted/prune.c @@ -1510,11 +1510,12 @@ age_table_entry(void) if (gt->gt_pruntbl != NULL || gt->gt_srctbl != NULL || gt->gt_prsent_timer > 0) { gt->gt_timer = CACHE_LIFETIME(cache_lifetime); - if (gt->gt_prsent_timer == -1) + if (gt->gt_prsent_timer == -1) { if (gt->gt_grpmems == 0) send_prune(gt); else gt->gt_prsent_timer = 0; + } gtnptr = >->gt_gnext; continue; } @@ -1547,11 +1548,12 @@ age_table_entry(void) #endif /* RSRR */ free((char *)gt); } else { - if (gt->gt_prsent_timer == -1) + if (gt->gt_prsent_timer == -1) { if (gt->gt_grpmems == 0) send_prune(gt); else gt->gt_prsent_timer = 0; + } gtnptr = >->gt_gnext; } } @@ -1929,12 +1931,13 @@ accept_mtrace(u_int32_t src, u_int32_t dst, u_int32_t group, resp->tr_rflags = TR_SCOPED; else if (gt->gt_prsent_timer) resp->tr_rflags = TR_PRUNED; - else if (!VIFM_ISSET(vifi, gt->gt_grpmems)) + else if (!VIFM_ISSET(vifi, gt->gt_grpmems)) { if (VIFM_ISSET(vifi, rt->rt_children) && !VIFM_ISSET(vifi, rt->rt_leaves)) resp->tr_rflags = TR_OPRUNED; else resp->tr_rflags = TR_NO_FWD; + } } else { if (scoped_addr(vifi, group)) resp->tr_rflags = TR_SCOPED; |