summaryrefslogtreecommitdiff
path: root/src/shared/log.c
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2012-07-26 14:23:49 +0200
committerMichal Schmidt <mschmidt@redhat.com>2012-07-26 14:24:40 +0200
commit6dc1e7e0ba35c078b533d06a4933edae38fd94ad (patch)
tree708b9c05aeb64cddb4c2febe15309cb8a3892853 /src/shared/log.c
parentcd6f1c0f87fd3e3345e51476e25cd1104efb7fa3 (diff)
downloadsystemd-6dc1e7e0ba35c078b533d06a4933edae38fd94ad.tar.gz
log: out-of-line __log_oom()
The callers' code gets smaller.
Diffstat (limited to 'src/shared/log.c')
-rw-r--r--src/shared/log.c5
1 files changed, 5 insertions, 0 deletions
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;