summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2012-06-21 20:17:50 +0200
committerGergely Nagy <algernon@balabit.hu>2012-06-22 15:41:26 +0200
commit5e33db1c8e9ff98979f33a8cc21149397f408ddf (patch)
treed35e042b8be336f28872242e2ebea7717ee54a2f /lib
parent1d6e30b31448952782f55177b7d41542acbfc992 (diff)
downloadlibumberlog-5e33db1c8e9ff98979f33a8cc21149397f408ddf.tar.gz
libumberlog-5e33db1c8e9ff98979f33a8cc21149397f408ddf.tar.xz
libumberlog-5e33db1c8e9ff98979f33a8cc21149397f408ddf.zip
Switch warn_unused_result attributes
These should not be on ul_*syslog, because there is nothing one can do to recover; OTOH they should be on ul_*format, because they indicate a memory leak. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/umberlog.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/umberlog.h b/lib/umberlog.h
index 51ed7be..1bb5a59 100644
--- a/lib/umberlog.h
+++ b/lib/umberlog.h
@@ -37,17 +37,17 @@
#define LOG_UL_NOTIME 0x0200
char *ul_format (int priority, const char *msg_format, ...)
- __attribute__((sentinel));
-char *ul_vformat (int priority, const char *msg_format, va_list ap);
+ __attribute__((warn_unused_result, sentinel));
+char *ul_vformat (int priority, const char *msg_format, va_list ap)
+ __attribute__((warn_unused_result));
void ul_openlog (const char *ident, int option, int facility);
void ul_closelog (void);
int ul_setlogmask (int mask);
int ul_syslog (int priority, const char *msg_format, ...)
- __attribute__((warn_unused_result, sentinel));
-int ul_vsyslog (int priority, const char *msg_format, va_list ap)
- __attribute__((warn_unused_result));
+ __attribute__((sentinel));
+int ul_vsyslog (int priority, const char *msg_format, va_list ap);
void ul_legacy_syslog (int priority, const char *msg_format, ...);
void ul_legacy_vsyslog (int priority, const char *msg_format, va_list ap);