1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-31 16:21:26 +03:00

io-util: add an unlikely decorator for a test that should never hold

This commit is contained in:
Lennart Poettering 2018-02-19 18:37:50 +01:00
parent 8ac2f74fb6
commit 7f7210c210

View File

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