Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Aug 2020 16:44:18 +0000 (UTC)
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r364710 - stable/12/sys/compat/linux
Message-ID:  <202008241644.07OGiID7086738@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trasz
Date: Mon Aug 24 16:44:17 2020
New Revision: 364710
URL: https://svnweb.freebsd.org/changeset/base/364710

Log:
  MFC r362101:
  
  Minor code cleanup; no functional changes.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/12/sys/compat/linux/linux_socket.c
  stable/12/sys/compat/linux/linux_socket.h
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/compat/linux/linux_socket.c
==============================================================================
--- stable/12/sys/compat/linux/linux_socket.c	Mon Aug 24 16:41:10 2020	(r364709)
+++ stable/12/sys/compat/linux/linux_socket.c	Mon Aug 24 16:44:17 2020	(r364710)
@@ -89,10 +89,9 @@ static int
 linux_to_bsd_sockopt_level(int level)
 {
 
-	switch (level) {
-	case LINUX_SOL_SOCKET:
+	if (level == LINUX_SOL_SOCKET)
 		return (SOL_SOCKET);
-	}
+	/* Remaining values are RFC-defined protocol numbers. */
 	return (level);
 }
 
@@ -100,10 +99,8 @@ static int
 bsd_to_linux_sockopt_level(int level)
 {
 
-	switch (level) {
-	case SOL_SOCKET:
+	if (level == SOL_SOCKET)
 		return (LINUX_SOL_SOCKET);
-	}
 	return (level);
 }
 

Modified: stable/12/sys/compat/linux/linux_socket.h
==============================================================================
--- stable/12/sys/compat/linux/linux_socket.h	Mon Aug 24 16:41:10 2020	(r364709)
+++ stable/12/sys/compat/linux/linux_socket.h	Mon Aug 24 16:44:17 2020	(r364710)
@@ -166,12 +166,6 @@ int linux_accept(struct thread *td, struct linux_accep
 
 /* Socket defines */
 #define	LINUX_SOL_SOCKET	1
-#define	LINUX_SOL_IP		0
-#define	LINUX_SOL_TCP		6
-#define	LINUX_SOL_UDP		17
-#define	LINUX_SOL_IPV6		41
-#define	LINUX_SOL_IPX		256
-#define	LINUX_SOL_AX25		257
 
 #define	LINUX_SO_DEBUG		1
 #define	LINUX_SO_REUSEADDR	2



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202008241644.07OGiID7086738>