projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ca39a3c
)
io-util: do not call log_oom() in library functions
author
Yu Watanabe
<watanabe.yu+github@gmail.com>
Fri, 13 Nov 2020 10:35:01 +0000
(19:35 +0900)
committer
Yu Watanabe
<watanabe.yu+github@gmail.com>
Fri, 13 Nov 2020 10:35:01 +0000
(19:35 +0900)
src/basic/io-util.c
patch
|
blob
|
history
diff --git
a/src/basic/io-util.c
b/src/basic/io-util.c
index 247e37fd809f8f6d52397690a567251e1421e803..4d7405296b8766320eef21f716739db81d5c8ce7 100644
(file)
--- a/
src/basic/io-util.c
+++ b/
src/basic/io-util.c
@@
-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)