summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inotail.c3
-rw-r--r--inotail.h3
2 files changed, 4 insertions, 2 deletions
diff --git a/inotail.c b/inotail.c
index c0c5302..da881d4 100644
--- a/inotail.c
+++ b/inotail.c
@@ -245,8 +245,7 @@ static int watch_files(struct file_struct *f, int n_files)
}
}
- /* Very unlikely! */
- if (!fil)
+ if (unlikely(!fil))
break;
if (inev->mask & IN_MODIFY) {
diff --git a/inotail.h b/inotail.h
index d885855..f6e90e8 100644
--- a/inotail.h
+++ b/inotail.h
@@ -24,4 +24,7 @@ struct file_struct {
# define dprintf(fmt, args...)
#endif /* DEBUG */
+/* Taken from linux kernel source tree */
+#define unlikely(x) __builtin_expect(!!(x), 0)
+
#endif /* _INOTAIL_H */
class='deletions'>-7/+1 2016-05-31pinctrl: amlogic: gxbb: add ethernet pinsKevin Hilman1-0/+39 2016-05-31pinctrl: amlogic: gxbb: add more UART pinsKevin Hilman1-0/+48 2016-05-31pinctrl: amlogic: gxbb: add EMMC and SD pinsKevin Hilman1-0/+41 2016-05-31pinctrl: amlogic: gxbb: add UART_AO_B, I2CKevin Hilman1-1/+34 2016-05-11pinctrl: meson: Fix eth_tx_en bit indexAlexander Müller1-1/+1 2016-05-11pinctrl: amlogic: Add support for Amlogic Meson GXBB SoCCarlo Caione4-1/+443 2016-04-21pinctrl: meson: Use devm_pinctrl_register() for pinctrl registrationLaxman Dewangan1-1/+1 2016-04-01pinctrl: Rename pinctrl_utils_dt_free_map to pinctrl_utils_free_mapIrina Tirdea1-1/+1 2016-03-09pinctrl: amlogic: Make driver independent from two-domain configurationCarlo Caione4-224/+228 2016-03-09pinctrl: amlogic: Separate some pin functions for Meson8 / Meson8bCarlo Caione1-8/+27 2016-03-09pinctrl: meson: make explicitly non-modularPaul Gortmaker1-7/+1 2016-01-05pinctrl: meson: use gpiochip data pointerLinus Walleij1-11/+6 2015-11-19gpio: change member .dev to .parentLinus Walleij1-1/+1 2015-06-24Merge tag 'pinctrl-v4.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/l...Linus Torvalds1-2/+2 2015-06-10pinctrl: make pinctrl_register() return proper error codeMasahiro Yamada1-2/+2 2015-05-19pinctrl: Fix gpio/pin mapping for Meson8bCarlo Caione2-3/+3 2015-04-07pinctrl: Add support for Meson8bCarlo Caione4-1/+905 2015-04-07documentation: Extend pinctrl docs for Meson8bCarlo Caione1-2/+3 2015-04-07pinctrl: Cleanup Meson8 driverCarlo Caione2-597/+461 2015-01-26pinctrl: add driver for Amlogic Meson SoCsBeniamino Galvani4-0/+2061