Merge pull request #17600 from yuwata/drop-log-oom

util: drop log_oom() from several library functions
This commit is contained in:
Yu Watanabe 2020-11-16 17:03:46 +09:00 committed by GitHub
commit b96f2f28da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View File

@ -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)

View File

@ -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;