Date: Tue, 7 Aug 2007 23:42:11 GMT From: "Constantine A. Murenin" <cnst@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 124855 for review Message-ID: <200708072342.l77NgBJT049547@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=124855 Change 124855 by cnst@dale on 2007/08/07 23:41:59 KNF sysctl(3) calls (no binary change) Affected files ... .. //depot/projects/soc2007/cnst-sensors/sbin.sysctl/sysctl.c#4 edit Differences ... ==== //depot/projects/soc2007/cnst-sensors/sbin.sysctl/sysctl.c#4 (text+ko) ==== @@ -289,7 +289,7 @@ } i = show_var(mib, len); - if (sysctl(mib, len, 0, 0, newval, newsize) == -1) { + if (sysctl(mib, len, NULL, NULL, newval, newsize) == -1) { if (!i && !bflag) putchar('\n'); switch (errno) { @@ -515,7 +515,7 @@ memcpy(qoid + 2, oid, len * sizeof(int)); j = sizeof(buf); - i = sysctl(qoid, len + 2, buf, &j, 0, 0); + i = sysctl(qoid, len + 2, buf, &j, NULL, 0); if (i) err(1, "sysctl fmt %d %d %d", i, j, errno); @@ -557,7 +557,7 @@ qoid[1] = 1; j = sizeof(name); - i = sysctl(qoid, nlen + 2, name, &j, 0, 0); + i = sysctl(qoid, nlen + 2, name, &j, NULL, 0); if (i || !j) err(1, "sysctl name %d %d %d", i, j, errno); @@ -574,7 +574,7 @@ if (dflag) { /* just print description */ qoid[1] = 5; j = sizeof(buf); - i = sysctl(qoid, nlen + 2, buf, &j, 0, 0); + i = sysctl(qoid, nlen + 2, buf, &j, NULL, 0); if (!nflag) printf("%s%s", name, sep); printf("%s", buf); @@ -582,7 +582,7 @@ } /* find an estimate of how much we need for this var */ j = 0; - i = sysctl(oid, nlen, 0, &j, 0, 0); + i = sysctl(oid, nlen, 0, &j, NULL, 0); j += j; /* we want to be sure :-) */ val = oval = malloc(j + 1); @@ -591,7 +591,7 @@ return (1); } len = j; - i = sysctl(oid, nlen, val, &len, 0, 0); + i = sysctl(oid, nlen, val, &len, NULL, 0); if (i || !len) { free(oval); return (1); @@ -728,7 +728,7 @@ } for (;;) { l2 = sizeof(name2); - j = sysctl(name1, l1, name2, &l2, 0, 0); + j = sysctl(name1, l1, name2, &l2, NULL, 0); if (j < 0) { if (errno == ENOENT) return (0);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200708072342.l77NgBJT049547>