From 876d4150aa3da531ddd687b48afada6e43f79146 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Mon, 2 Mar 2020 15:25:13 -0800 Subject: uhd: Apply clang-format against all .cpp and .hpp files in host/ Note: template_lvbitx.{cpp,hpp} need to be excluded from the list of files that clang-format gets applied against. --- host/lib/utils/log_c.cpp | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) (limited to 'host/lib/utils/log_c.cpp') diff --git a/host/lib/utils/log_c.cpp b/host/lib/utils/log_c.cpp index 8ccc031a5..be08dbe01 100644 --- a/host/lib/utils/log_c.cpp +++ b/host/lib/utils/log_c.cpp @@ -9,16 +9,15 @@ #include -void UHD_API _uhd_log( - const uhd_log_severity_level_t log_level, - const char *filename, - const int lineno, - const char *component, - const char *format, - ... -) { - int size = 0; - char *c_str = NULL; +void UHD_API _uhd_log(const uhd_log_severity_level_t log_level, + const char* filename, + const int lineno, + const char* component, + const char* format, + ...) +{ + int size = 0; + char* c_str = NULL; va_list ap; /* figure out size */ @@ -32,7 +31,7 @@ void UHD_API _uhd_log( /* trailing '\0' */ size++; - c_str = (char *)malloc(size); + c_str = (char*)malloc(size); if (!c_str) { return; } @@ -45,14 +44,14 @@ void UHD_API _uhd_log( va_end(ap); try { - uhd::_log::log( - static_cast(log_level), + uhd::_log::log(static_cast(log_level), filename, unsigned(lineno), component, - boost::this_thread::get_id() - ) << c_str; - } catch (...) {} + boost::this_thread::get_id()) + << c_str; + } catch (...) { + } out_free: free(c_str); -- cgit v1.2.3