]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Use compile-time constant for the array size, to make more compilers happy.
authorAlex Rousskov <rousskov@measurement-factory.com>
Thu, 25 Nov 2010 22:04:30 +0000 (15:04 -0700)
committerAlex Rousskov <rousskov@measurement-factory.com>
Thu, 25 Nov 2010 22:04:30 +0000 (15:04 -0700)
src/ipc/TypedMsgHdr.cc

index b38954c3e91dc0d7820b023278458ca7cab788a3..a49527e5fdd3a7d800fbbee3e5e56bed3af68812 100644 (file)
@@ -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);
 }