From 0f802dc5694aa9b6be0c465a1fcbf360154df140 Mon Sep 17 00:00:00 2001 From: mvs Date: Mon, 28 Nov 2022 21:39:28 +0000 Subject: [PATCH] Simplify return path of (*pr_ctloutput)() return value in sogetopt(). ok guenther@ kn@ --- sys/kern/uipc_socket.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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 { -- 2.20.1