mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-25 11:47:43 +03:00
Remove bcopy(), bzero(), bcmp()
bcopy() has a confusing argument order and is actually a move, not a copy; they're all deprecated since POSIX.1-2001 and removed in -2008, and we shim them out to mem*() on Linux anyway Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12996
This commit is contained in:
+3
-3
@@ -947,8 +947,8 @@ spa_get_errlists(spa_t *spa, avl_tree_t *last, avl_tree_t *scrub)
|
||||
{
|
||||
ASSERT(MUTEX_HELD(&spa->spa_errlist_lock));
|
||||
|
||||
bcopy(&spa->spa_errlist_last, last, sizeof (avl_tree_t));
|
||||
bcopy(&spa->spa_errlist_scrub, scrub, sizeof (avl_tree_t));
|
||||
memcpy(last, &spa->spa_errlist_last, sizeof (avl_tree_t));
|
||||
memcpy(scrub, &spa->spa_errlist_scrub, sizeof (avl_tree_t));
|
||||
|
||||
avl_create(&spa->spa_errlist_scrub,
|
||||
spa_error_entry_compare, sizeof (spa_error_entry_t),
|
||||
@@ -8495,7 +8495,7 @@ spa_sync_nvlist(spa_t *spa, uint64_t obj, nvlist_t *nv, dmu_tx_t *tx)
|
||||
|
||||
VERIFY(nvlist_pack(nv, &packed, &nvsize, NV_ENCODE_XDR,
|
||||
KM_SLEEP) == 0);
|
||||
bzero(packed + nvsize, bufsize - nvsize);
|
||||
memset(packed + nvsize, 0, bufsize - nvsize);
|
||||
|
||||
dmu_write(spa->spa_meta_objset, obj, 0, bufsize, packed, tx);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user