From: Lennart Poettering Date: Mon, 19 Feb 2018 17:37:50 +0000 (+0100) Subject: io-util: add an unlikely decorator for a test that should never hold X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=76c35addb83f46fdb054feb968b3f1d7f1f7dae4;p=elogind.git io-util: add an unlikely decorator for a test that should never hold --- diff --git a/src/basic/io-util.c b/src/basic/io-util.c index 08ad42ed9..a6e34cb76 100644 --- 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 {