chiark / gitweb /
event: some snake-oil to speed up impossible error checks
authorLennart Poettering <lennart@poettering.net>
Sat, 14 Dec 2013 04:08:47 +0000 (05:08 +0100)
committerLennart Poettering <lennart@poettering.net>
Sat, 14 Dec 2013 04:10:25 +0000 (05:10 +0100)
src/libsystemd-bus/sd-event.c

index bf8b0fc..06c84d7 100644 (file)
@@ -1605,7 +1605,7 @@ static int flush_timer(sd_event *e, int fd, uint32_t events, usec_t *next) {
                 return -errno;
         }
 
-        if (ss != sizeof(x))
+        if (_unlikely_(ss != sizeof(x)))
                 return -EIO;
 
         if (next)
@@ -1733,7 +1733,7 @@ static int process_signal(sd_event *e, uint32_t events) {
                         return -errno;
                 }
 
-                if (ss != sizeof(si))
+                if (_unlikely_(ss != sizeof(si)))
                         return -EIO;
 
                 read_one = true;