From eb3f3839d4a2802f309f92719d3cae0a81e297c4 Mon Sep 17 00:00:00 2001 From: wbaumann Date: Sun, 7 Nov 2010 10:42:32 +0000 Subject: [PATCH] use format string in syslog --- src/cache.c | 4 ++-- src/webdav.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cache.c b/src/cache.c index 97a3a94..b2b896f 100644 --- a/src/cache.c +++ b/src/cache.c @@ -2561,7 +2561,7 @@ create_cache_file(dav_node *node) if (fd <= 0) { syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_ERR), _("can't create cache file %s"), node->cache_path); - syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_ERR), strerror(errno)); + syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_ERR), "%s", strerror(errno)); free(node->cache_path); node->cache_path = NULL; return EIO; @@ -2595,7 +2595,7 @@ create_dir_cache_file(dav_node *dir) if (fd <= 0) { syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_ERR), _("can't create cache file %s"), dir->cache_path); - syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_ERR), strerror(errno)); + syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_ERR), "%s", strerror(errno)); free(dir->cache_path); dir->cache_path = NULL; return EIO; diff --git a/src/webdav.c b/src/webdav.c index 367a90d..1202315 100644 --- a/src/webdav.c +++ b/src/webdav.c @@ -1493,7 +1493,7 @@ log_writer(void *cookie, const char *buffer, size_t size) written++; } *cpos = '\0'; - syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), (char *) cookie); + syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "%s", (char *) cookie); } return written; }