From: adrian <> Date: Mon, 28 Oct 2002 15:53:37 +0000 (+0000) Subject: Wrap the memset() just before the msgrcv() in #ifdef ALWAYS_ZERO_BUFFERS. X-Git-Tag: SQUID_3_0_PRE1~547 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a3d2e4c021a5a8dcf17cd4ae90ef58e5db0f80b5;p=thirdparty%2Fsquid.git 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. --- 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;