summaryrefslogtreecommitdiff
path: root/usr.sbin/ifstated
diff options
context:
space:
mode:
authorSebastian Benoit <benno@cvs.openbsd.org>2016-07-18 21:17:33 +0000
committerSebastian Benoit <benno@cvs.openbsd.org>2016-07-18 21:17:33 +0000
commit3b3968fb90c9da767510f76f87c8d9202ace6bb6 (patch)
tree96057530bae2daf30100a071b410dceecad194fb /usr.sbin/ifstated
parent267dec5c9b1a1dd16e1d73ab2c9b6630120eac3e (diff)
add format attributes to log functions
ok stsp@ claudio@ florian@
Diffstat (limited to 'usr.sbin/ifstated')
-rw-r--r--usr.sbin/ifstated/ifstated.h26
1 files changed, 17 insertions, 9 deletions
diff --git a/usr.sbin/ifstated/ifstated.h b/usr.sbin/ifstated/ifstated.h
index de32109e0ef..8eeb0b0a74f 100644
--- a/usr.sbin/ifstated/ifstated.h
+++ b/usr.sbin/ifstated/ifstated.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ifstated.h,v 1.8 2014/11/03 18:44:36 bluhm Exp $ */
+/* $OpenBSD: ifstated.h,v 1.9 2016/07/18 21:17:32 benno Exp $ */
/*
* Copyright (c) 2004 Ryan McBride
@@ -138,11 +138,19 @@ void clear_config(struct ifsd_config *);
/* log.c */
void log_init(int);
-void log_warn(const char *, ...);
-void log_warnx(const char *, ...);
-void log_info(const char *, ...);
-void log_debug(const char *, ...);
-void vlog(int, const char *, va_list);
-void logit(int, const char *, ...);
-__dead void fatal(const char *);
-__dead void fatalx(const char *);
+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 vlog(int, const char *, va_list)
+ __attribute__((__format__ (printf, 2, 0)));
+void logit(int, const char *, ...)
+ __attribute__((__format__ (printf, 2, 3)));
+void fatal(const char *) __dead
+ __attribute__((__format__ (printf, 1, 0)));
+void fatalx(const char *) __dead
+ __attribute__((__format__ (printf, 1, 0)));