mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-10 01:17:44 +03:00
Merge pull request #17600 from yuwata/drop-log-oom
util: drop log_oom() from several library functions
This commit is contained in:
commit
b96f2f28da
@ -291,7 +291,7 @@ int iovw_put(struct iovec_wrapper *iovw, void *data, size_t len) {
|
||||
return -E2BIG;
|
||||
|
||||
if (!GREEDY_REALLOC(iovw->iovec, iovw->size_bytes, iovw->count + 1))
|
||||
return log_oom();
|
||||
return -ENOMEM;
|
||||
|
||||
iovw->iovec[iovw->count++] = IOVEC_MAKE(data, len);
|
||||
return 0;
|
||||
@ -303,7 +303,7 @@ int iovw_put_string_field(struct iovec_wrapper *iovw, const char *field, const c
|
||||
|
||||
x = strjoin(field, value);
|
||||
if (!x)
|
||||
return log_oom();
|
||||
return -ENOMEM;
|
||||
|
||||
r = iovw_put(iovw, x, strlen(x));
|
||||
if (r >= 0)
|
||||
|
@ -8,7 +8,6 @@
|
||||
#include "alloc-util.h"
|
||||
#include "bpf-program.h"
|
||||
#include "fd-util.h"
|
||||
#include "log.h"
|
||||
#include "memory-util.h"
|
||||
#include "missing_syscall.h"
|
||||
#include "path-util.h"
|
||||
@ -18,7 +17,7 @@ int bpf_program_new(uint32_t prog_type, BPFProgram **ret) {
|
||||
|
||||
p = new0(BPFProgram, 1);
|
||||
if (!p)
|
||||
return log_oom();
|
||||
return -ENOMEM;
|
||||
|
||||
p->n_ref = 1;
|
||||
p->prog_type = prog_type;
|
||||
|
Loading…
Reference in New Issue
Block a user