From 6dc1e7e0ba35c078b533d06a4933edae38fd94ad Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Thu, 26 Jul 2012 14:23:49 +0200 Subject: log: out-of-line __log_oom() The callers' code gets smaller. --- src/shared/log.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/shared/log.c') diff --git a/src/shared/log.c b/src/shared/log.c index 6a10dc4540..1cbc9d6250 100644 --- a/src/shared/log.c +++ b/src/shared/log.c @@ -658,6 +658,11 @@ _noreturn_ void log_assert_failed_unreachable(const char *text, const char *file log_assert(text, file, line, func, "Code should not be reached '%s' at %s:%u, function %s(). Aborting."); } +int __log_oom(const char *file, int line, const char *func) { + log_meta(LOG_ERR, file, line, func, "Out of memory."); + return -ENOMEM; +} + int log_set_target_from_string(const char *e) { LogTarget t; -- cgit v1.2.3-54-g00ecf