tree-wide: introduce strerror_safe()

This commit is contained in:
Yu Watanabe
2019-07-05 02:43:56 +09:00
parent 7fa6223f67
commit 4bbccb02ea
20 changed files with 55 additions and 38 deletions
+2 -1
View File
@@ -4,6 +4,7 @@
#include <unistd.h>
#include "alloc-util.h"
#include "errno-util.h"
#include "escape.h"
#include "fd-util.h"
#include "io-util.h"
@@ -422,7 +423,7 @@ int journal_importer_push_data(JournalImporter *imp, const char *data, size_t si
"Failed to store received data of size %zu "
"(in addition to existing %zu bytes with %zu filled): %s",
size, imp->size, imp->filled,
strerror(ENOMEM));
strerror_safe(ENOMEM));
memcpy(imp->buf + imp->filled, data, size);
imp->filled += size;