diff options
author | cem <cem@FreeBSD.org> | 2015-10-23 15:40:44 +0000 |
---|---|---|
committer | cem <cem@FreeBSD.org> | 2015-10-23 15:40:44 +0000 |
commit | e3bd714786684ae30514c95fb821f7c31465a77b (patch) | |
tree | 90be5746fa9daab078137ff6e9b740c572f80e22 /sbin/sysctl | |
parent | c24a22103b562414262f25bf5a00d62fcfdbf28a (diff) | |
download | FreeBSD-src-e3bd714786684ae30514c95fb821f7c31465a77b.zip FreeBSD-src-e3bd714786684ae30514c95fb821f7c31465a77b.tar.gz |
sysctl(8): Fix style nits
Suggested by: bde
Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'sbin/sysctl')
-rw-r--r-- | sbin/sysctl/sysctl.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c index c877922..c89315f 100644 --- a/sbin/sysctl/sysctl.c +++ b/sbin/sysctl/sysctl.c @@ -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; |