mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40: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:
@@ -485,7 +485,7 @@ fmd_buf_read(fmd_hdl_t *hdl, fmd_case_t *cp,
|
||||
assert(cp->ci_bufptr != NULL);
|
||||
assert(size <= cp->ci_bufsiz);
|
||||
|
||||
bcopy(cp->ci_bufptr, buf, size);
|
||||
memcpy(buf, cp->ci_bufptr, size);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -497,7 +497,7 @@ fmd_buf_write(fmd_hdl_t *hdl, fmd_case_t *cp,
|
||||
assert(cp->ci_bufptr != NULL);
|
||||
assert(cp->ci_bufsiz >= size);
|
||||
|
||||
bcopy(buf, cp->ci_bufptr, size);
|
||||
memcpy(cp->ci_bufptr, buf, size);
|
||||
}
|
||||
|
||||
/* SERD Engines */
|
||||
@@ -581,7 +581,7 @@ _timer_notify(union sigval sv)
|
||||
fmd_hdl_debug(hdl, "timer fired (%p)", ftp->ft_tid);
|
||||
|
||||
/* disarm the timer */
|
||||
bzero(&its, sizeof (struct itimerspec));
|
||||
memset(&its, 0, sizeof (struct itimerspec));
|
||||
timer_settime(ftp->ft_tid, 0, &its, NULL);
|
||||
|
||||
/* Note that the fmdo_timeout can remove this timer */
|
||||
|
||||
@@ -74,7 +74,7 @@ fmd_serd_eng_alloc(const char *name, uint64_t n, hrtime_t t)
|
||||
fmd_serd_eng_t *sgp;
|
||||
|
||||
sgp = malloc(sizeof (fmd_serd_eng_t));
|
||||
bzero(sgp, sizeof (fmd_serd_eng_t));
|
||||
memset(sgp, 0, sizeof (fmd_serd_eng_t));
|
||||
|
||||
sgp->sg_name = strdup(name);
|
||||
sgp->sg_flags = FMD_SERD_DIRTY;
|
||||
@@ -139,7 +139,7 @@ fmd_serd_hash_destroy(fmd_serd_hash_t *shp)
|
||||
}
|
||||
|
||||
free(shp->sh_hash);
|
||||
bzero(shp, sizeof (fmd_serd_hash_t));
|
||||
memset(shp, 0, sizeof (fmd_serd_hash_t));
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user