Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Oct 2015 15:40:44 +0000 (UTC)
From:      "Conrad E. Meyer" <cem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r289835 - head/sbin/sysctl
Message-ID:  <201510231540.t9NFeiQj020123@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cem
Date: Fri Oct 23 15:40:44 2015
New Revision: 289835
URL: https://svnweb.freebsd.org/changeset/base/289835

Log:
  sysctl(8): Fix style nits
  
  Suggested by:	bde
  Sponsored by:	EMC / Isilon Storage Division

Modified:
  head/sbin/sysctl/sysctl.c

Modified: head/sbin/sysctl/sysctl.c
==============================================================================
--- head/sbin/sysctl/sysctl.c	Fri Oct 23 15:39:59 2015	(r289834)
+++ head/sbin/sysctl/sysctl.c	Fri Oct 23 15:40:44 2015	(r289835)
@@ -90,25 +90,25 @@ static int ctl_sign[CTLTYPE+1] = {
 };
 
 static int ctl_size[CTLTYPE+1] = {
+	[CTLTYPE_U8] = sizeof(uint8_t),
+	[CTLTYPE_U16] = sizeof(uint16_t),
 	[CTLTYPE_INT] = sizeof(int),
 	[CTLTYPE_UINT] = sizeof(u_int),
 	[CTLTYPE_LONG] = sizeof(long),
 	[CTLTYPE_ULONG] = sizeof(u_long),
 	[CTLTYPE_S64] = sizeof(int64_t),
 	[CTLTYPE_U64] = sizeof(uint64_t),
-	[CTLTYPE_U8] = sizeof(uint8_t),
-	[CTLTYPE_U16] = sizeof(uint16_t),
 };
 
 static const char *ctl_typename[CTLTYPE+1] = {
+	[CTLTYPE_U8] = "uint8_t",
+	[CTLTYPE_U16] = "uint16_t",
 	[CTLTYPE_INT] = "integer",
 	[CTLTYPE_UINT] = "unsigned integer",
 	[CTLTYPE_LONG] = "long integer",
 	[CTLTYPE_ULONG] = "unsigned long",
 	[CTLTYPE_S64] = "int64_t",
 	[CTLTYPE_U64] = "uint64_t",
-	[CTLTYPE_U8] = "uint8_t",
-	[CTLTYPE_U16] = "uint16_t",
 };
 
 static void
@@ -359,7 +359,8 @@ parse(const char *string, int lineno)
 				newsize = sizeof(u8val);
 				break;
 			case CTLTYPE_U16:
-				u16val = (uint16_t)strtoul(newvalstr, &endptr, 0);
+				u16val = (uint16_t)strtoul(newvalstr, &endptr,
+				    0);
 				newval = &u16val;
 				newsize = sizeof(u16val);
 				break;



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