[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
one-line change in sysctl
- To: commit@xxxxxxxxxxx
- Subject: one-line change in sysctl
- From: Luigi Rizzo <luigi@xxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 19 Aug 1996 17:17:38 +0200 (MET DST)
- Sender: owner-commit@xxxxxxxxxxx
The following one-line change to sysctl allows one to use hexadecimal
constants in setting integer variables. Would someone care to apply it ?
This is for -current as of today (19aug96) but the same applies to 2.1.X
No changes to the manpage are necessary, I think.
Luigi
# diff -bwu sysctl.c.orig sysctl.c
--- sysctl.c.orig Mon Aug 19 16:54:49 1996
+++ sysctl.c Mon Aug 19 16:55:19 1996
@@ -166,7 +166,7 @@
switch (kind & CTLTYPE) {
case CTLTYPE_INT:
- intval = atoi(newval);
+ sscanf(newval, "%i", &intval);
newval = &intval;
newsize = sizeof intval;
break;