From 845c8927ef20e245bb88bc783dc2e581b61fbaba Mon Sep 17 00:00:00 2001 From: Mark Vitale Date: Fri, 19 May 2017 16:34:21 -0400 Subject: [PATCH] ubik: remove redundant memset from udisk_write When udisk_write is extending the database, DRead will return a null buffer. udisk_write then calls DNew to get a brand new buffer for the extension write, and clears it with memset. However, this is redundant, since DNew has already cleared the new buffer. Remove the redundant memset. No functional change should be incurred by this commit. Change-Id: Ia6768098fb3c67475c8948c874b92b91bf17cdb7 Reviewed-on: https://gerrit.openafs.org/12621 Reviewed-by: Benjamin Kaduk Reviewed-by: Andrew Deason Reviewed-by: Michael Meffie Reviewed-by: Marcio Brito Barbosa Tested-by: BuildBot --- src/ubik/disk.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/ubik/disk.c b/src/ubik/disk.c index a091e7f..2cf419a 100644 --- a/src/ubik/disk.c +++ b/src/ubik/disk.c @@ -807,7 +807,6 @@ udisk_write(struct ubik_trans *atrans, afs_int32 afile, void *abuffer, bp = DNew(atrans, afile, apos >> UBIK_LOGPAGESIZE); if (!bp) return UIOERROR; - memset(bp, 0, UBIK_PAGESIZE); } /* otherwise, min of remaining bytes and end of buffer to user mode */ offset = apos & (UBIK_PAGESIZE - 1); -- 1.9.4