chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ca62631
)
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
Sven Eden
<yamakuzure@gmx.net>
Wed, 30 May 2018 05:59:00 +0000
(07:59 +0200)
src/basic/io-util.c
patch
|
blob
|
history
diff --git
a/src/basic/io-util.c
b/src/basic/io-util.c
index 08ad42ed952468df310df00972cdecb3a051bfb5..a6e34cb76256716cdce66dece41dda65d11ad7a0 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 {