From 8679677c5205b9d84ffb81181aca3a1945d032e2 Mon Sep 17 00:00:00 2001 From: johan Date: Fri, 30 Aug 2002 10:52:17 +0000 Subject: Use correct arguments to sysctl in code example. PR: 40038 Submitted by: perky Approved by: sheldonh (mentor) MFC after: 1 week --- share/man/man4/ifmib.4 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'share/man/man4/ifmib.4') diff --git a/share/man/man4/ifmib.4 b/share/man/man4/ifmib.4 index bad2ec6..fe5bdbf 100644 --- a/share/man/man4/ifmib.4 +++ b/share/man/man4/ifmib.4 @@ -101,6 +101,7 @@ int get_ifmib_general(int row, struct ifmibdata *ifmd) { int name[6]; + size_t len; name[0] = CTL_NET; name[1] = PF_LINK; @@ -109,7 +110,9 @@ get_ifmib_general(int row, struct ifmibdata *ifmd) name[4] = row; name[5] = IFDATA_GENERAL; - return sysctl(name, 6, ifmd, sizeof *ifmd, (void *)0, 0); + len = sizeof(*ifmd); + + return sysctl(name, 6, ifmd, &len, (void *)0, 0); } .Ed .Pp -- cgit v1.1