Date: Mon, 19 Aug 1996 17:17:38 +0200 (MET DST) From: Luigi Rizzo <luigi@labinfo.iet.unipi.it> To: commit@FreeBSD.ORG Subject: one-line change in sysctl Message-ID: <199608191517.RAA16186@labinfo.iet.unipi.it>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199608191517.RAA16186>