From bab21ae7629cb564664063de81d6ec729182b735 Mon Sep 17 00:00:00 2001 From: Nazarenko Nikita Vladimirovich Date: Fri, 18 Jul 2025 01:34:46 +0300 Subject: [PATCH] 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 --- sbin/kldstat/kldstat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/kldstat/kldstat.c b/sbin/kldstat/kldstat.c index 79c647576440..3a90f1c97eb4 100644 --- a/sbin/kldstat/kldstat.c +++ b/sbin/kldstat/kldstat.c @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #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);