aboutsummaryrefslogtreecommitdiffstats
path: root/lv2/log/logger.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-09-23 13:47:44 +0200
committerDavid Robillard <d@drobilla.net>2018-09-23 13:47:44 +0200
commit9337cb4993f4db09567dc6e274b0a78aed99f136 (patch)
tree9f59fe3b1c321217959a5cd6dc07ff92fc834c11 /lv2/log/logger.h
parente7041238e4d5ee3bb7e10680e0d786e22c279b30 (diff)
downloadlv2-9337cb4993f4db09567dc6e274b0a78aed99f136.tar.xz
Shrink code slightly by removing some if-else structure
Diffstat (limited to 'lv2/log/logger.h')
-rw-r--r--lv2/log/logger.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/lv2/log/logger.h b/lv2/log/logger.h
index 0c608a6..7d9b005 100644
--- a/lv2/log/logger.h
+++ b/lv2/log/logger.h
@@ -94,11 +94,9 @@ lv2_log_vprintf(LV2_Log_Logger* logger,
const char* fmt,
va_list args)
{
- if (logger && logger->log) {
- return logger->log->vprintf(logger->log->handle, type, fmt, args);
- } else {
- return vfprintf(stderr, fmt, args);
- }
+ return ((logger && logger->log)
+ ? logger->log->vprintf(logger->log->handle, type, fmt, args)
+ : vfprintf(stderr, fmt, args));
}
/** Log an error via lv2_log_vprintf(). */