From ae9f26fffcb781f5fca64afc7aa3e91337c908fa Mon Sep 17 00:00:00 2001
From: dd
Date: Tue, 2 Mar 2004 05:42:52 +0000
Subject: Add CTLTYPE_QUAD to the list of types for which we don't want an
empty value. All the other numeric types are doing it . . .
---
sbin/sysctl/sysctl.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
(limited to 'sbin/sysctl')
diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c
index b7284ab..c5c2d6d 100644
--- a/sbin/sysctl/sysctl.c
+++ b/sbin/sysctl/sysctl.c
@@ -214,7 +214,8 @@ parse(char *string)
if ((kind & CTLTYPE) == CTLTYPE_INT ||
(kind & CTLTYPE) == CTLTYPE_UINT ||
(kind & CTLTYPE) == CTLTYPE_LONG ||
- (kind & CTLTYPE) == CTLTYPE_ULONG) {
+ (kind & CTLTYPE) == CTLTYPE_ULONG ||
+ (kind & CTLTYPE) == CTLTYPE_QUAD) {
if (strlen(newval) == 0)
errx(1, "empty numeric value");
}
--
cgit v1.1