From 7f7210c2102025500a68cfd42f31a4d97e4b0c6f 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 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 {