mirror of
https://gitlab.freedesktop.org/libevdev/libevdev.git
synced 2025-12-24 20:30:06 +01:00
Add unlikely() macro
Taken from systemd. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
4390845fd2
commit
5b0b2ae114
1 changed files with 2 additions and 0 deletions
|
|
@ -28,6 +28,8 @@
|
|||
#include <string.h>
|
||||
#include "libevdev-int.h"
|
||||
|
||||
#define unlikely(x) (__builtin_expect(!!(x),0))
|
||||
|
||||
static inline bool
|
||||
startswith(const char *str, size_t len, const char *prefix, size_t plen)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue