summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inotail.c6
-rw-r--r--inotail.h15
2 files changed, 13 insertions, 8 deletions
diff --git a/inotail.c b/inotail.c
index 9d79d01..1dac409 100644
--- a/inotail.c
+++ b/inotail.c
@@ -3,7 +3,9 @@
* A fast implementation of tail which uses the inotify API present in
* recent versions of the Linux kernel.
*
- * Copyright (C) 2005-2009, Tobias Klauser <tklauser@distanz.ch>
+ * More information on http://distanz.ch/inotail
+ *
+ * Copyright (C) 2005-2011, Tobias Klauser <tklauser@distanz.ch>
*
* The idea was taken from turbotail.
*
@@ -96,7 +98,7 @@ static inline int xargmatch(const char *context, const char *arg)
return (strlen(arg) == ctx_len && strncmp(arg, context, ctx_len) == 0);
}
-static void usage(const int status)
+static void __noreturn usage(const int status)
{
fprintf(stdout, "Usage: %s [OPTION]... [FILE]...\n\n"
" --retry keep trying to open a file even if it is not\n"
diff --git a/inotail.h b/inotail.h
index 3320c3d..e5ad3c3 100644
--- a/inotail.h
+++ b/inotail.h
@@ -1,7 +1,8 @@
/*
- * Copyright (C) 2005-2009, Tobias Klauser <tklauser@distanz.ch>
+ * Copyright (C) 2005-2011, Tobias Klauser <tklauser@distanz.ch>
*
- * Licensed under the terms of the GNU General Public License; version 2 or later.
+ * This file is licensed under the terms of the GNU General Public License;
+ * version 2 or later.
*/
#ifndef _INOTAIL_H
@@ -47,11 +48,13 @@ struct file_struct {
#define is_digit(c) ((c) >= '0' && (c) <= '9')
#ifdef __GNUC__
-# define likely(x) __builtin_expect(!!(x), 1)
-# define unlikely(x) __builtin_expect(!!(x), 0)
+# define __noreturn __attribute ((noreturn))
+# define likely(x) __builtin_expect(!!(x), 1)
+# define unlikely(x) __builtin_expect(!!(x), 0)
#else
-# define likely(x) (x)
-# define unlikely(x) (x)
+# define __noreturn
+# define likely(x) (x)
+# define unlikely(x) (x)
#endif /* __GNUC__ */
#ifdef DEBUG