use format string in syslog

This commit is contained in:
wbaumann 2010-11-07 10:42:32 +00:00
parent 09fc39b814
commit eb3f3839d4
2 changed files with 3 additions and 3 deletions

View File

@ -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;

View File

@ -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;
}