]> git.ipfire.org Git - thirdparty/samba.git/commit
remove usage of bzero
authorMichael Tokarev <mjt@tls.msk.ru>
Mon, 18 Nov 2024 12:00:05 +0000 (15:00 +0300)
committerPavel Filipensky <pfilipensky@samba.org>
Thu, 2 Jan 2025 17:01:30 +0000 (17:01 +0000)
commitbf1e1387ea4a136d06029863eb63b3b1db1c7db0
treeef15c6d0f340596208cc431eb436428e7f876320
parent712117155e0efae593d2867037c92741f2151252
remove usage of bzero

bzero() function has been deprecated for a long time.
In samba it is replaced with memset().  But samba also
provides common memory-zeroing macros, like ZERO_STRUCT().
In all places where bzero() is used, it actually meant to
zero a structure or an array.

So replace these bzero() calls with ZERO_STRUCT() or
ZERO_ARRAY() as appropriate, and remove bzero() replacement
and testing entirely.

While at it, also stop checking for presence of memset() -
this function is standard for a very long time, and the
only conditional where HAVE_MEMSET were used, was to
provide replacement for bzero() - in all other places
memset() is used unconditionally.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
ctdb/server/ctdb_statistics.c
ctdb/server/ipalloc_common.c
ctdb/tools/ctdb.c
lib/replace/README
lib/replace/replace.h
lib/replace/tests/testsuite.c
lib/replace/wscript