mirror of
https://git.FreeBSD.org/src.git
synced 2026-06-02 11:24:32 +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:
committed by
Warner Losh
parent
af0ec3fa29
commit
bab21ae762
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user