summaryrefslogtreecommitdiff
path: root/usr.sbin/eigrpd/log.h
diff options
context:
space:
mode:
authorRenato Westphal <renato@cvs.openbsd.org>2016-09-02 16:44:34 +0000
committerRenato Westphal <renato@cvs.openbsd.org>2016-09-02 16:44:34 +0000
commitfcf9752bb7cfa0955234368e43600610c4308242 (patch)
treef12e2cdd668aab5d8339150fa1af1dfada1dda77 /usr.sbin/eigrpd/log.h
parentdcaa3316f517f3e75debd2dc1ae2838de28a7b02 (diff)
Make functions and variables static whenever possible.
style(9) says: "Function prototypes for private functions (i.e., functions not used elsewhere) go at the top of the first source module. In userland, functions local to one source module should be declared 'static'". The benefits of doing so include: * clean up of the eigrpd global namespace; * improved readability; * more hints to the compiler/linker to generate more efficient code. Additional changes: * Declare all extern variables in header files; * Clean up the indentation of all function prototypes and global variables. ok claudio@ benno@
Diffstat (limited to 'usr.sbin/eigrpd/log.h')
-rw-r--r--usr.sbin/eigrpd/log.h39
1 files changed, 19 insertions, 20 deletions
diff --git a/usr.sbin/eigrpd/log.h b/usr.sbin/eigrpd/log.h
index cfd1eac4a19..557a4d47ee4 100644
--- a/usr.sbin/eigrpd/log.h
+++ b/usr.sbin/eigrpd/log.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: log.h,v 1.3 2016/07/18 21:14:30 benno Exp $ */
+/* $OpenBSD: log.h,v 1.4 2016/09/02 16:44:33 renato Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -21,25 +21,24 @@
#include <stdarg.h>
-void log_init(int);
-void log_verbose(int);
-void logit(int, const char *, ...)
- __attribute__((__format__ (printf, 2, 3)));
-void vlog(int, const char *, va_list)
- __attribute__((__format__ (printf, 2, 0)));
-void log_warn(const char *, ...)
- __attribute__((__format__ (printf, 1, 2)));
-void log_warnx(const char *, ...)
- __attribute__((__format__ (printf, 1, 2)));
-void log_info(const char *, ...)
- __attribute__((__format__ (printf, 1, 2)));
-void log_debug(const char *, ...)
- __attribute__((__format__ (printf, 1, 2)));
-void fatal(const char *) __dead
- __attribute__((__format__ (printf, 1, 0)));
-void fatalx(const char *) __dead
- __attribute__((__format__ (printf, 1, 0)));
-
+void log_init(int);
+void log_verbose(int);
+void logit(int, const char *, ...)
+ __attribute__((__format__ (printf, 2, 3)));
+void vlog(int, const char *, va_list)
+ __attribute__((__format__ (printf, 2, 0)));
+void log_warn(const char *, ...)
+ __attribute__((__format__ (printf, 1, 2)));
+void log_warnx(const char *, ...)
+ __attribute__((__format__ (printf, 1, 2)));
+void log_info(const char *, ...)
+ __attribute__((__format__ (printf, 1, 2)));
+void log_debug(const char *, ...)
+ __attribute__((__format__ (printf, 1, 2)));
+void fatal(const char *) __dead
+ __attribute__((__format__ (printf, 1, 0)));
+void fatalx(const char *) __dead
+ __attribute__((__format__ (printf, 1, 0)));
const char *log_in6addr(const struct in6_addr *);
const char *log_in6addr_scope(const struct in6_addr *, unsigned int);
const char *log_sockaddr(void *);