Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Dec 2015 20:51:05 +0000 (UTC)
From:      Garrett Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r293004 - stable/9/contrib/bsnmp/snmpd
Message-ID:  <201512312051.tBVKp5jR045609@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Thu Dec 31 20:51:05 2015
New Revision: 293004
URL: https://svnweb.freebsd.org/changeset/base/293004

Log:
  MFstable/10 r292998:
  
  MFC r292710:
  
  Remove unused function `act_getkernstring`
  
  This fixes a clang -Wunused warning
  
  Differential Revision: https://reviews.freebsd.org/D4697
  Reported by: Jenkins
  Reviewed by: araujo, bapt
  Sponsored by: EMC / Isilon Storage Division

Modified:
  stable/9/contrib/bsnmp/snmpd/action.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/contrib/   (props changed)
  stable/9/contrib/bsnmp/   (props changed)

Modified: stable/9/contrib/bsnmp/snmpd/action.c
==============================================================================
--- stable/9/contrib/bsnmp/snmpd/action.c	Thu Dec 31 20:25:26 2015	(r293003)
+++ stable/9/contrib/bsnmp/snmpd/action.c	Thu Dec 31 20:51:05 2015	(r293004)
@@ -60,29 +60,6 @@ static const struct asn_oid
 #endif
 
 /*
- * Get a string value from the KERN sysctl subtree.
- */
-static char *
-act_getkernstring(int id)
-{
-	int mib[2];
-	size_t len;
-	char *string;
-
-	mib[0] = CTL_KERN;
-	mib[1] = id;
-	if (sysctl(mib, 2, NULL, &len, NULL, 0) != 0)
-		return (NULL);
-	if ((string = malloc(len)) == NULL)
-		return (NULL);
-	if (sysctl(mib, 2, string, &len, NULL, 0) != 0) {
-		free(string);
-		return (NULL);
-	}
-	return (string);
-}
-
-/*
  * Get an integer value from the KERN sysctl subtree.
  */
 static char *



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