diff options
author | johan <johan@FreeBSD.org> | 2002-08-30 10:52:17 +0000 |
---|---|---|
committer | johan <johan@FreeBSD.org> | 2002-08-30 10:52:17 +0000 |
commit | 8679677c5205b9d84ffb81181aca3a1945d032e2 (patch) | |
tree | dc5c35c1cc74dde3cecba40aedcb6e8ecc7ff414 | |
parent | 49cb8194a9387f367f7688a6e49ef962741716e8 (diff) | |
download | FreeBSD-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
-rw-r--r-- | share/man/man4/ifmib.4 | 5 |
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 |