From 76c35addb83f46fdb054feb968b3f1d7f1f7dae4 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 19 Feb 2018 18:37:50 +0100 Subject: [PATCH] io-util: add an unlikely decorator for a test that should never hold --- src/basic/io-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 { -- 2.30.2