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:
+4
-4
@@ -1012,7 +1012,7 @@ dmu_read_impl(dnode_t *dn, uint64_t offset, uint64_t size,
|
||||
if (dn->dn_maxblkid == 0) {
|
||||
uint64_t newsz = offset > dn->dn_datablksz ? 0 :
|
||||
MIN(size, dn->dn_datablksz - offset);
|
||||
bzero((char *)buf + newsz, size - newsz);
|
||||
memset((char *)buf + newsz, 0, size - newsz);
|
||||
size = newsz;
|
||||
}
|
||||
|
||||
@@ -2077,9 +2077,9 @@ dmu_write_policy(objset_t *os, dnode_t *dn, int level, int wp, zio_prop_t *zp)
|
||||
zp->zp_nopwrite = nopwrite;
|
||||
zp->zp_encrypt = encrypt;
|
||||
zp->zp_byteorder = ZFS_HOST_BYTEORDER;
|
||||
bzero(zp->zp_salt, ZIO_DATA_SALT_LEN);
|
||||
bzero(zp->zp_iv, ZIO_DATA_IV_LEN);
|
||||
bzero(zp->zp_mac, ZIO_DATA_MAC_LEN);
|
||||
memset(zp->zp_salt, 0, ZIO_DATA_SALT_LEN);
|
||||
memset(zp->zp_iv, 0, ZIO_DATA_IV_LEN);
|
||||
memset(zp->zp_mac, 0, ZIO_DATA_MAC_LEN);
|
||||
zp->zp_zpl_smallblk = DMU_OT_IS_FILE(zp->zp_type) ?
|
||||
os->os_zpl_special_smallblock : 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user