Date: Mon, 1 Jul 2002 01:47:32 +0900 (KST) From: Hye-Shik Chang <perky@FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: docs/40038: src/share/man/man4/ifmib.4 : syntax error on example code Message-ID: <200206301647.g5UGlWUW023883@kornet.hanirc.org>
next in thread | raw e-mail | index | archive | help
>Number: 40038 >Category: docs >Synopsis: src/share/man/man4/ifmib.4 : syntax error on example code >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Jun 30 09:50:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Hye-Shik Chang >Release: FreeBSD 5.0-CURRENT i386 >Organization: Yonsei University >Environment: FreeBSD sbtm.yonsei.net 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Tue Jun 4 20:20:35 KST 2002 perky@akaraka.yonsei.ac.kr:/usr/src/sys/i386/compile/JOARRA i386 >Description: arg 3 of sysctl(2) cannot be a constant. >How-To-Repeat: >Fix: --- ifmib.4.orig Mon Jul 1 01:23:48 2002 +++ ifmib.4 Mon Jul 1 01:26:46 2002 @@ -101,6 +101,7 @@ get_ifmib_general(int row, struct ifmibdata *ifmd) { int name[6]; + int len = sizeof *ifmd; name[0] = CTL_NET; name[1] = PF_LINK; @@ -109,7 +110,7 @@ name[4] = row; name[5] = IFDATA_GENERAL; - return sysctl(name, 6, ifmd, sizeof *ifmd, (void *)0, 0); + return sysctl(name, 6, ifmd, &len, (void *)0, 0); } .Ed .Pp >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200206301647.g5UGlWUW023883>