diff options
Diffstat (limited to 'xlators/storage')
-rw-r--r-- | xlators/storage/bd/src/bd.c | 4 | ||||
-rw-r--r-- | xlators/storage/posix/src/posix-inode-fd-ops.c | 3 |
2 files changed, 2 insertions, 5 deletions
diff --git a/xlators/storage/bd/src/bd.c b/xlators/storage/bd/src/bd.c index 07b7ecd52ad..57699ae0aac 100644 --- a/xlators/storage/bd/src/bd.c +++ b/xlators/storage/bd/src/bd.c @@ -2148,7 +2148,7 @@ bd_rchecksum (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset, char *buf = NULL; int32_t weak_checksum = 0; bd_fd_t *bd_fd = NULL; - unsigned char strong_checksum[MD5_DIGEST_LENGTH] = {0}; + unsigned char strong_checksum[SHA256_DIGEST_LENGTH] = {0}; VALIDATE_OR_GOTO (frame, out); VALIDATE_OR_GOTO (this, out); @@ -2162,8 +2162,6 @@ bd_rchecksum (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset, return 0; } - memset (strong_checksum, 0, MD5_DIGEST_LENGTH); - alloc_buf = page_aligned_alloc (len, &buf); if (!alloc_buf) { op_errno = ENOMEM; diff --git a/xlators/storage/posix/src/posix-inode-fd-ops.c b/xlators/storage/posix/src/posix-inode-fd-ops.c index 9d1b19ac9a0..2a3c7a2b025 100644 --- a/xlators/storage/posix/src/posix-inode-fd-ops.c +++ b/xlators/storage/posix/src/posix-inode-fd-ops.c @@ -4852,7 +4852,7 @@ posix_rchecksum (call_frame_t *frame, xlator_t *this, ssize_t bytes_read = 0; int32_t weak_checksum = 0; int32_t zerofillcheck = 0; - unsigned char strong_checksum[MD5_DIGEST_LENGTH] = {0}; + unsigned char strong_checksum[SHA256_DIGEST_LENGTH] = {0}; struct posix_private *priv = NULL; dict_t *rsp_xdata = NULL; gf_boolean_t buf_has_zeroes = _gf_false; @@ -4862,7 +4862,6 @@ posix_rchecksum (call_frame_t *frame, xlator_t *this, VALIDATE_OR_GOTO (fd, out); priv = this->private; - memset (strong_checksum, 0, MD5_DIGEST_LENGTH); alloc_buf = _page_aligned_alloc (len, &buf); if (!alloc_buf) { |