From b5b6e556ed7e9fa6bdea2365e82765981ee9f28c Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Thu, 30 Sep 2010 02:17:43 +0200 Subject: SNOW-86: Dangerous macro leads to possible wrong code See http://redmine.imprudenceviewer.org/issues/571 This patch appeared to already have been partially applied. I added more semi-colons after all llendl (and LLENDL) macros, and wrapped the lllog ... llendl construct into do { ... } while(0) as is usual for macros that mimic a single statement. The patch was double checked with regular expression greps and a compile. --- linden/indra/llmessage/lltemplatemessagebuilder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linden/indra/llmessage') diff --git a/linden/indra/llmessage/lltemplatemessagebuilder.cpp b/linden/indra/llmessage/lltemplatemessagebuilder.cpp index e641980..1e17018 100644 --- a/linden/indra/llmessage/lltemplatemessagebuilder.cpp +++ b/linden/indra/llmessage/lltemplatemessagebuilder.cpp @@ -730,7 +730,7 @@ static S32 buildBlock(U8* buffer, S32 buffer_size, const LLMessageBlock* templat << "Attempted to pack " << result + mvci.getSize() << " bytes into a buffer with size " - << buffer_size << "." << llendl + << buffer_size << "." << llendl; } } } -- cgit v1.1