Use do { ... } while (0) for the *_LOG macros

Without this patch, such code would not compile:

if (cond)
    WARN_LOG(FOO, "msg");
else
    WARN_LOG(FOO, "msg2");
This commit is contained in:
Pierre Bourdon
2012-08-20 13:12:49 +02:00
parent 603bd9982d
commit 54fc4029dd
4 changed files with 9 additions and 9 deletions

View File

@ -284,7 +284,7 @@ bool ParsePartitionData(SPartition& _rPartition)
if (!FileSystem)
{
ERROR_LOG(DISCIO, "Failed to create filesystem for group %d partition %u", _rPartition.GroupNumber, _rPartition.Number)
ERROR_LOG(DISCIO, "Failed to create filesystem for group %d partition %u", _rPartition.GroupNumber, _rPartition.Number);
ParsedOK = false;
}
else