diff options
author | Martin Braun <martin.braun@ettus.com> | 2020-03-02 15:25:13 -0800 |
---|---|---|
committer | atrnati <54334261+atrnati@users.noreply.github.com> | 2020-03-03 08:51:32 -0600 |
commit | 876d4150aa3da531ddd687b48afada6e43f79146 (patch) | |
tree | fd72a71419f4cd800d4e500cfcaded4dfc8dc367 /host/lib/utils/log_c.cpp | |
parent | 1393553d623bdf4ba40d5435c9719b6ce990d9ac (diff) | |
download | uhd-876d4150aa3da531ddd687b48afada6e43f79146.tar.gz uhd-876d4150aa3da531ddd687b48afada6e43f79146.tar.bz2 uhd-876d4150aa3da531ddd687b48afada6e43f79146.zip |
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.
Diffstat (limited to 'host/lib/utils/log_c.cpp')
-rw-r--r-- | host/lib/utils/log_c.cpp | 31 |
1 files changed, 15 insertions, 16 deletions
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 <stdarg.h> -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<uhd::log::severity_level>(log_level), + uhd::_log::log(static_cast<uhd::log::severity_level>(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); |