bin/172632: Unused structure in netconfig.h

Andrey Simonenko simon at comsys.ntu-kpi.kiev.ua
Fri Oct 12 09:50:01 UTC 2012


>Number:         172632
>Category:       bin
>Synopsis:       Unused structure in netconfig.h
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct 12 09:50:00 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Andrey Simonenko
>Release:        FreeBSD 10.0-CURRENT
>Organization:
>Environment:
>Description:

The netconfig.h file has the NCONF_HANDLE structure that is unused
in the code and is not mentioned in getnetconfig(3) and getnetpath(3).

>How-To-Repeat:
>Fix:
diff -ruNp src.orig/include/netconfig.h src/include/netconfig.h
--- src.orig/include/netconfig.h	2002-03-23 19:24:53.000000000 +0200
+++ src/include/netconfig.h	2012-10-12 10:10:05.000000000 +0300
@@ -22,11 +22,6 @@ struct netconfig {
 	unsigned long nc_unused[9];	/* reserved */
 };
 
-typedef struct {
-	struct netconfig **nc_head;
-	struct netconfig **nc_curr;
-} NCONF_HANDLE;
-
 /*
  * nc_semantics values
  */
diff -ruNp src.orig/lib/libc/rpc/rpc_generic.c src/lib/libc/rpc/rpc_generic.c
--- src.orig/lib/libc/rpc/rpc_generic.c	2012-10-04 14:01:01.000000000 +0300
+++ src/lib/libc/rpc/rpc_generic.c	2012-10-12 10:10:27.000000000 +0300
@@ -66,7 +66,7 @@ __FBSDID("$FreeBSD: src/lib/libc/rpc/rpc
 #include "mt_misc.h"
 
 struct handle {
-	NCONF_HANDLE *nhandle;
+	void *nhandle;
 	int nflag;		/* Whether NETPATH or NETCONFIG */
 	int nettype;
 };
diff -ruNp src.orig/sys/rpc/netconfig.h src/sys/rpc/netconfig.h
--- src.orig/sys/rpc/netconfig.h	2008-03-26 17:23:10.000000000 +0200
+++ src/sys/rpc/netconfig.h	2012-10-12 10:10:57.000000000 +0300
@@ -22,11 +22,6 @@ struct netconfig {
 	unsigned long nc_unused[9];	/* reserved */
 };
 
-typedef struct {
-	struct netconfig **nc_head;
-	struct netconfig **nc_curr;
-} NCONF_HANDLE;
-
 /*
  * nc_semantics values
  */
diff -ruNp src.orig/sys/rpc/rpc_generic.c src/sys/rpc/rpc_generic.c
--- src.orig/sys/rpc/rpc_generic.c	2011-06-20 01:08:55.000000000 +0300
+++ src/sys/rpc/rpc_generic.c	2012-10-12 10:10:57.000000000 +0300
@@ -74,7 +74,7 @@ extern	u_long sb_max_adj;	/* not defined
 struct rpc_gss_entries	rpc_gss_entries;
 
 struct handle {
-	NCONF_HANDLE *nhandle;
+	void *nhandle;
 	int nflag;		/* Whether NETPATH or NETCONFIG */
 	int nettype;
 };
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list