mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-25 03:37:45 +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:
@@ -1477,8 +1477,7 @@ spa_strdup(const char *s)
|
||||
|
||||
len = strlen(s);
|
||||
new = kmem_alloc(len + 1, KM_SLEEP);
|
||||
bcopy(s, new, len);
|
||||
new[len] = '\0';
|
||||
memcpy(new, s, len + 1);
|
||||
|
||||
return (new);
|
||||
}
|
||||
@@ -2566,7 +2565,7 @@ spa_scan_get_stats(spa_t *spa, pool_scan_stat_t *ps)
|
||||
|
||||
if (scn == NULL || scn->scn_phys.scn_func == POOL_SCAN_NONE)
|
||||
return (SET_ERROR(ENOENT));
|
||||
bzero(ps, sizeof (pool_scan_stat_t));
|
||||
memset(ps, 0, sizeof (pool_scan_stat_t));
|
||||
|
||||
/* data stored on disk */
|
||||
ps->pss_func = scn->scn_phys.scn_func;
|
||||
|
||||
Reference in New Issue
Block a user