From simon@comsys.ntu-kpi.kiev.ua  Fri Oct 12 09:46:10 2012
Return-Path: <simon@comsys.ntu-kpi.kiev.ua>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 9317E3B3
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 12 Oct 2012 09:46:10 +0000 (UTC)
	(envelope-from simon@comsys.ntu-kpi.kiev.ua)
Received: from comsys.kpi.ua (comsys.kpi.ua [77.47.192.42])
	by mx1.freebsd.org (Postfix) with ESMTP id 0E52F8FC19
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 12 Oct 2012 09:46:09 +0000 (UTC)
Received: from pm513-1.comsys.kpi.ua ([10.18.52.101] helo=pm513-1.comsys.ntu-kpi.kiev.ua)
	by comsys.kpi.ua with esmtpsa (TLSv1:AES256-SHA:256)
	(Exim 4.63)
	(envelope-from <simon@comsys.ntu-kpi.kiev.ua>)
	id 1TMbom-0000VC-1r
	for FreeBSD-gnats-submit@freebsd.org; Fri, 12 Oct 2012 12:46:08 +0300
Received: by pm513-1.comsys.ntu-kpi.kiev.ua (Postfix, from userid 1001)
	id 5C46F1CC26; Fri, 12 Oct 2012 12:46:06 +0300 (EEST)
Message-Id: <20121012094606.GA59100@pm513-1.comsys.ntu-kpi.kiev.ua>
Date: Fri, 12 Oct 2012 12:46:06 +0300
From: Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua>
To: FreeBSD-gnats-submit@freebsd.org
Subject: Unused structure in netconfig.h

>Number:         172632
>Category:       kern
>Synopsis:       [headers] [patch] 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:  Sat Oct 13 22:21:22 UTC 2012
>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:
