From 7c14e48776cf82b521cc8b7dad05892a81b8659b Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 24 Feb 2011 09:38:59 -0600 Subject: Mark log callback format string const Signed-off-by: Dan McGee --- lib/libalpm/alpm.h | 4 ++-- lib/libalpm/log.c | 4 ++-- lib/libalpm/log.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/libalpm') diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index 7fec293d..8e1e022a 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -74,8 +74,8 @@ typedef enum _pmloglevel_t { PM_LOG_FUNCTION = (1 << 3) } pmloglevel_t; -typedef void (*alpm_cb_log)(pmloglevel_t, char *, va_list); -int alpm_logaction(char *fmt, ...); +typedef void (*alpm_cb_log)(pmloglevel_t, const char *, va_list); +int alpm_logaction(const char *fmt, ...); /* * Downloading diff --git a/lib/libalpm/log.c b/lib/libalpm/log.c index dc4f938a..09c6fb84 100644 --- a/lib/libalpm/log.c +++ b/lib/libalpm/log.c @@ -42,7 +42,7 @@ * @param fmt output format * @return 0 on success, -1 on error (pm_errno is set accordingly) */ -int SYMEXPORT alpm_logaction(char *fmt, ...) +int SYMEXPORT alpm_logaction(const char *fmt, ...) { int ret; va_list args; @@ -88,7 +88,7 @@ int SYMEXPORT alpm_logaction(char *fmt, ...) /** @} */ -void _alpm_log(pmloglevel_t flag, char *fmt, ...) +void _alpm_log(pmloglevel_t flag, const char *fmt, ...) { va_list args; alpm_cb_log logcb = alpm_option_get_logcb(); diff --git a/lib/libalpm/log.h b/lib/libalpm/log.h index 5ce08e45..9a2961fb 100644 --- a/lib/libalpm/log.h +++ b/lib/libalpm/log.h @@ -29,7 +29,7 @@ #define ALPM_LOG_FUNC #endif -void _alpm_log(pmloglevel_t flag, char *fmt, ...) __attribute__((format(printf,2,3))); +void _alpm_log(pmloglevel_t flag, const char *fmt, ...) __attribute__((format(printf,2,3))); #endif /* _ALPM_LOG_H */ -- cgit v1.2.3-70-g09d2