diff options
author | Nick Kralevich <nnk@google.com> | 2013-07-10 07:37:11 -0700 |
---|---|---|
committer | Nick Kralevich <nnk@google.com> | 2013-07-10 07:37:11 -0700 |
commit | 6b1dd1797e11217fad1f9fb3783678f8a180a3f0 (patch) | |
tree | f1edc7b2f70d48f21d4ee09907cb2d35d99da0b7 /libc/include/syslog.h | |
parent | b7f492375291306065472b67011eebb324de1022 (diff) | |
download | android_bionic-6b1dd1797e11217fad1f9fb3783678f8a180a3f0.tar.gz android_bionic-6b1dd1797e11217fad1f9fb3783678f8a180a3f0.tar.bz2 android_bionic-6b1dd1797e11217fad1f9fb3783678f8a180a3f0.zip |
syslog.h: add __printflike to syslog functions
Allow the compiler to detect formating bugs.
Change-Id: I6a4af6cae59dc3adf14b075431a41885213a649a
Diffstat (limited to 'libc/include/syslog.h')
-rw-r--r-- | libc/include/syslog.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libc/include/syslog.h b/libc/include/syslog.h index d35bc79af..423ededd8 100644 --- a/libc/include/syslog.h +++ b/libc/include/syslog.h @@ -103,13 +103,13 @@ struct syslog_data { extern void closelog(void); extern void openlog(const char *, int, int); extern int setlogmask(int); -extern void syslog(int, const char *, ...); -extern void vsyslog(int, const char *, va_list); +extern void syslog(int, const char *, ...) __printflike(2, 3); +extern void vsyslog(int, const char *, va_list) __printflike(2, 0); extern void closelog_r(struct syslog_data *); extern void openlog_r(const char *, int, int, struct syslog_data *); extern int setlogmask_r(int, struct syslog_data *); -extern void syslog_r(int, struct syslog_data *, const char *, ...); -extern void vsyslog_r(int, struct syslog_data *, const char *, va_list); +extern void syslog_r(int, struct syslog_data *, const char *, ...) __printflike(3, 4); +extern void vsyslog_r(int, struct syslog_data *, const char *, va_list) __printflike(3, 0); __END_DECLS |