io-util: do not call log_oom() in library functions

This commit is contained in:
Yu Watanabe 2020-11-13 19:35:01 +09:00
parent ca39a3cef9
commit c4cce95731
1 changed files with 2 additions and 2 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)