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-Tag: v238~82^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7f7210c2102025500a68cfd42f31a4d97e4b0c6f;p=thirdparty%2Fsystemd.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 08ad42ed952..a6e34cb7625 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 {