summaryrefslogtreecommitdiffstats
path: root/share/man/man4/ifmib.4
diff options
context:
space:
mode:
authorjohan <johan@FreeBSD.org>2002-08-30 10:52:17 +0000
committerjohan <johan@FreeBSD.org>2002-08-30 10:52:17 +0000
commit8679677c5205b9d84ffb81181aca3a1945d032e2 (patch)
treedc5c35c1cc74dde3cecba40aedcb6e8ecc7ff414 /share/man/man4/ifmib.4
parent49cb8194a9387f367f7688a6e49ef962741716e8 (diff)
downloadFreeBSD-src-8679677c5205b9d84ffb81181aca3a1945d032e2.zip
FreeBSD-src-8679677c5205b9d84ffb81181aca3a1945d032e2.tar.gz
Use correct arguments to sysctl in code example.
PR: 40038 Submitted by: perky Approved by: sheldonh (mentor) MFC after: 1 week
Diffstat (limited to 'share/man/man4/ifmib.4')
-rw-r--r--share/man/man4/ifmib.45
1 files changed, 4 insertions, 1 deletions
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
OpenPOWER on IntegriCloud