mirror of
https://git.freebsd.org/src.git
synced 2026-01-11 19:57:22 +00:00
kldstat: Memory zeroing using memset()
Use memset() instead of the outdated bzero() function when zeroing memory. bzero() was in the POSIX.1-2001 standard. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1774 Closes: https://github.com/freebsd/freebsd-src/pull/1774
This commit is contained in:
parent
af0ec3fa29
commit
bab21ae762
1 changed files with 2 additions and 2 deletions
|
|
@ -35,7 +35,7 @@
|
|||
#include <libutil.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <strings.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#define PTR_WIDTH ((int)(sizeof(void *) * 2 + 2))
|
||||
|
|
@ -51,7 +51,7 @@ printmod(int modid)
|
|||
{
|
||||
struct module_stat stat;
|
||||
|
||||
bzero(&stat, sizeof(stat));
|
||||
memset(&stat, 0, sizeof(stat));
|
||||
stat.version = sizeof(struct module_stat);
|
||||
if (modstat(modid, &stat) < 0) {
|
||||
warn("can't stat module id %d", modid);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue