io-util: add an unlikely decorator for a test that should never hold
authorLennart Poettering <lennart@poettering.net>
Mon, 19 Feb 2018 17:37:50 +0000 (18:37 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 20 Feb 2018 14:39:31 +0000 (15:39 +0100)
src/basic/io-util.c

index 08ad42e..a6e34cb 100644 (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 {