diff options
author | David Robillard <d@drobilla.net> | 2018-09-23 13:47:44 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-09-23 13:47:44 +0200 |
commit | 9337cb4993f4db09567dc6e274b0a78aed99f136 (patch) | |
tree | 9f59fe3b1c321217959a5cd6dc07ff92fc834c11 /lv2/log | |
parent | e7041238e4d5ee3bb7e10680e0d786e22c279b30 (diff) | |
download | lv2-9337cb4993f4db09567dc6e274b0a78aed99f136.tar.xz |
Shrink code slightly by removing some if-else structure
Diffstat (limited to 'lv2/log')
-rw-r--r-- | lv2/log/logger.h | 8 |
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(). */ |