projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8ac2f74
)
io-util: add an unlikely decorator for a test that should never hold
author
Lennart Poettering
<lennart@poettering.net>
Mon, 19 Feb 2018 17:37:50 +0000
(18:37 +0100)
committer
Lennart Poettering
<lennart@poettering.net>
Tue, 20 Feb 2018 14:39:31 +0000
(15:39 +0100)
src/basic/io-util.c
patch
|
blob
|
history
diff --git
a/src/basic/io-util.c
b/src/basic/io-util.c
index
08ad42e
..
a6e34cb
100644
(file)
--- a/
src/basic/io-util.c
+++ b/
src/basic/io-util.c
@@
-137,7
+137,7
@@
int loop_write(int fd, const void *buf, size_t nbytes, bool do_poll) {
assert(fd >= 0);
assert(buf);
- if (
nbytes > (size_t) SSIZE_MAX
)
+ if (
_unlikely_(nbytes > (size_t) SSIZE_MAX)
)
return -EINVAL;
do {