From 8756ce9107278fb3962785698d2a0f2cc3810d6e Mon Sep 17 00:00:00 2001 From: Sepherosa Ziehau Date: Thu, 29 Oct 2015 09:20:29 +0800 Subject: [PATCH] udp/usrreq: Add brackets properly The brackets were left out pretty accidentally, but the code also worked pretty accidentally: int error = 0; if (ai != NULL) error = udp_preattach(...); if (error) goto out else { /* mismatched comment */ } Reported-by: s4 on DragonFlyDigest --- sys/netinet/udp_usrreq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index 4f18c29e6d..fbb30d43b1 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -1211,15 +1211,15 @@ udp_attach(netmsg_t msg) struct socket *so = msg->attach.base.nm_so; struct pru_attach_info *ai = msg->attach.nm_ai; struct inpcb *inp; - int error = 0; + int error; KASSERT(so->so_pcb == NULL, ("udp socket attached")); - if (ai != NULL) + if (ai != NULL) { error = udp_preattach(so, 0 /* don't care */, ai); if (error) goto out; - else { + } else { /* Post attach; do nothing */ } -- 2.41.0