mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-26 22:23:08 +00:00
rwhod: Use nitems(foo) instead of sizeof(foo)/sizeof(foo[0])
Pull Request: https://github.com/freebsd/freebsd-src/pull/888 Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
This commit is contained in:
parent
f93475cf0f
commit
4c6e656e2e
@ -478,7 +478,7 @@ sender_process(void)
|
||||
we->we_idle = htonl(now - stb.st_atime);
|
||||
}
|
||||
(void) getloadavg(avenrun,
|
||||
sizeof(avenrun) / sizeof(avenrun[0]));
|
||||
nitems(avenrun));
|
||||
for (i = 0; i < 3; i++)
|
||||
mywd.wd_loadav[i] = htonl((u_long)(avenrun[i] * 100));
|
||||
cc = (char *)wend - (char *)&mywd;
|
||||
|
Loading…
Reference in New Issue
Block a user