From: Alex Rousskov Date: Thu, 25 Nov 2010 22:04:30 +0000 (-0700) Subject: Use compile-time constant for the array size, to make more compilers happy. X-Git-Tag: take1~65 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f867ba6be6041b89d1754cc83dd9965c2d9e6e5f;p=thirdparty%2Fsquid.git Use compile-time constant for the array size, to make more compilers happy. --- diff --git a/src/ipc/TypedMsgHdr.cc b/src/ipc/TypedMsgHdr.cc index b38954c3e9..a49527e5fd 100644 --- a/src/ipc/TypedMsgHdr.cc +++ b/src/ipc/TypedMsgHdr.cc @@ -122,7 +122,7 @@ Ipc::TypedMsgHdr::getString(String &s) const Must(length <= maxSize); // TODO: use SBuf.reserve() instead of a temporary buffer - char buf[length]; + char buf[maxSize]; getRaw(&buf, length); s.limitInit(buf, length); }