From a3d2e4c021a5a8dcf17cd4ae90ef58e5db0f80b5 Mon Sep 17 00:00:00 2001 From: adrian <> Date: Mon, 28 Oct 2002 15:53:37 +0000 Subject: [PATCH] Wrap the memset() just before the msgrcv() in #ifdef ALWAYS_ZERO_BUFFERS. There's no real point in zeroing the buffer just before we read and then verify the message is the right length - unless we're debugging. --- src/fs/diskd/store_dir_diskd.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/fs/diskd/store_dir_diskd.cc b/src/fs/diskd/store_dir_diskd.cc index e868560215..e0486b7bea 100644 --- a/src/fs/diskd/store_dir_diskd.cc +++ b/src/fs/diskd/store_dir_diskd.cc @@ -1,6 +1,6 @@ /* - * $Id: store_dir_diskd.cc,v 1.72 2002/10/13 20:35:26 robertc Exp $ + * $Id: store_dir_diskd.cc,v 1.73 2002/10/28 08:53:37 adrian Exp $ * * DEBUG: section 47 Store Directory Routines * AUTHOR: Duane Wessels @@ -203,7 +203,9 @@ storeDiskdDirCallback(SwapDir * SD) diskd_stats.max_away = diskd_stats.sent_count - diskd_stats.recv_count; } while (1) { +#ifdef ALWAYS_ZERO_BUFFERS memset(&M, '\0', sizeof(M)); +#endif x = msgrcv(diskdinfo->rmsgid, &M, msg_snd_rcv_sz, 0, IPC_NOWAIT); if (x < 0) break; -- 2.47.3