mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-30 02:34:14 +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:
@@ -333,7 +333,7 @@ SHA512_Final(unsigned char digest[static SHA512_DIGEST_LENGTH], SHA512_CTX *ctx)
|
||||
be64enc_vect(digest, ctx->state, SHA512_DIGEST_LENGTH);
|
||||
|
||||
/* Clear the context state */
|
||||
explicit_bzero(ctx, sizeof (*ctx));
|
||||
memset(ctx, 0, sizeof (*ctx));
|
||||
}
|
||||
|
||||
/* SHA-512t: ******************************************************** */
|
||||
@@ -377,7 +377,7 @@ SHA512_224_Final(unsigned char digest[static SHA512_224_DIGEST_LENGTH],
|
||||
be64enc_vect(digest, ctx->state, SHA512_224_DIGEST_LENGTH);
|
||||
|
||||
/* Clear the context state */
|
||||
explicit_bzero(ctx, sizeof (*ctx));
|
||||
memset(ctx, 0, sizeof (*ctx));
|
||||
}
|
||||
|
||||
void
|
||||
@@ -417,7 +417,7 @@ SHA512_256_Final(unsigned char digest[static SHA512_256_DIGEST_LENGTH],
|
||||
be64enc_vect(digest, ctx->state, SHA512_256_DIGEST_LENGTH);
|
||||
|
||||
/* Clear the context state */
|
||||
explicit_bzero(ctx, sizeof (*ctx));
|
||||
memset(ctx, 0, sizeof (*ctx));
|
||||
}
|
||||
|
||||
/* ** SHA-384: ******************************************************** */
|
||||
@@ -467,7 +467,7 @@ SHA384_Final(unsigned char digest[static SHA384_DIGEST_LENGTH], SHA384_CTX *ctx)
|
||||
be64enc_vect(digest, ctx->state, SHA384_DIGEST_LENGTH);
|
||||
|
||||
/* Clear the context state */
|
||||
explicit_bzero(ctx, sizeof (*ctx));
|
||||
memset(ctx, 0, sizeof (*ctx));
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
||||
Reference in New Issue
Block a user