From f6ed3071673266ab9ce2cec96a1f7131b437e0e3 Mon Sep 17 00:00:00 2001 From: Thomas Tsou Date: Tue, 21 Jun 2011 17:41:31 -0700 Subject: [PATCH] control: use braces with conditions and logging macros Removes warnings and may prevent future clumsy mistakes. Signed-off-by: Thomas Tsou --- public-trunk/Control/CallControl.cpp | 7 +++++-- public-trunk/Control/MobilityManagement.cpp | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/public-trunk/Control/CallControl.cpp b/public-trunk/Control/CallControl.cpp index 86411c6..e885771 100644 --- a/public-trunk/Control/CallControl.cpp +++ b/public-trunk/Control/CallControl.cpp @@ -361,8 +361,11 @@ bool callManagementDispatchGSM(TransactionEntry& transaction, LogicalChannel* LC return false; } - if (message) LOG(NOTICE) << "no support for message " << *message << " from " << transaction.subscriber(); - else LOG(NOTICE) << "no support for unrecognized message from " << transaction.subscriber(); + if (message) { + LOG(NOTICE) << "no support for message " << *message << " from " << transaction.subscriber(); + } else { + LOG(NOTICE) << "no support for unrecognized message from " << transaction.subscriber(); + } // If we got here, we're ignoring the message. diff --git a/public-trunk/Control/MobilityManagement.cpp b/public-trunk/Control/MobilityManagement.cpp index cb4d0d9..084f870 100644 --- a/public-trunk/Control/MobilityManagement.cpp +++ b/public-trunk/Control/MobilityManagement.cpp @@ -242,8 +242,11 @@ void Control::LocationUpdatingController(const L3LocationUpdatingRequest* lur, S // Otherwise, we are here because of open registration. // Either way, we're going to register a phone if we arrive here. - if (success) LOG(INFO) << "registration SUCCESS: " << mobID; - else LOG(INFO) << "registration ALLOWED: " << mobID; + if (success) { + LOG(INFO) << "registration SUCCESS: " << mobID; + } else { + LOG(INFO) << "registration ALLOWED: " << mobID; + } // Send the "short name".