From: mvs Date: Mon, 28 Nov 2022 21:39:28 +0000 (+0000) Subject: Simplify return path of (*pr_ctloutput)() return value in sogetopt(). X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=0f802dc5694aa9b6be0c465a1fcbf360154df140;p=openbsd Simplify return path of (*pr_ctloutput)() return value in sogetopt(). ok guenther@ kn@ --- diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 478763592b4..92612453418 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_socket.c,v 1.290 2022/10/03 16:43:52 bluhm Exp $ */ +/* $OpenBSD: uipc_socket.c,v 1.291 2022/11/28 21:39:28 mvs Exp $ */ /* $NetBSD: uipc_socket.c,v 1.21 1996/02/04 02:17:52 christos Exp $ */ /* @@ -1956,9 +1956,7 @@ sogetopt(struct socket *so, int level, int optname, struct mbuf *m) error = (*so->so_proto->pr_ctloutput)(PRCO_GETOPT, so, level, optname, m); - if (error) - return (error); - return (0); + return (error); } else return (ENOPROTOOPT); } else {