]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Wrap the memset() just before the msgrcv() in #ifdef ALWAYS_ZERO_BUFFERS.
authoradrian <>
Mon, 28 Oct 2002 15:53:37 +0000 (15:53 +0000)
committeradrian <>
Mon, 28 Oct 2002 15:53:37 +0000 (15:53 +0000)
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

index e8685602150e70a2b304b3d01276013be2804818..e0486b7bea776241b0c7ef052db3743ba09c3a30 100644 (file)
@@ -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;