projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tree wide: Replace sstrerror() with STRERRNO.
[collectd.git]
/
src
/
bind.c
diff --git
a/src/bind.c
b/src/bind.c
index
824d044
..
b77a641
100644
(file)
--- a/
src/bind.c
+++ b/
src/bind.c
@@
-440,18
+440,14
@@
static int bind_xml_read_timestamp(const char *xpath_expression, /* {{{ */
#if HAVE_TIMEGM
time_t t = timegm(&tm);
if (t == ((time_t)-1)) {
#if HAVE_TIMEGM
time_t t = timegm(&tm);
if (t == ((time_t)-1)) {
- char errbuf[1024];
- ERROR("bind plugin: timegm() failed: %s",
- sstrerror(errno, errbuf, sizeof(errbuf)));
+ ERROR("bind plugin: timegm() failed: %s", STRERRNO);
return -1;
}
*ret_value = t;
#else
time_t t = mktime(&tm);
if (t == ((time_t)-1)) {
return -1;
}
*ret_value = t;
#else
time_t t = mktime(&tm);
if (t == ((time_t)-1)) {
- char errbuf[1024];
- ERROR("bind plugin: mktime() failed: %s",
- sstrerror(errno, errbuf, sizeof(errbuf)));
+ ERROR("bind plugin: mktime() failed: %s", STRERRNO);
return -1;
}
/* mktime assumes that tm is local time. Luckily, it also sets timezone to
return -1;
}
/* mktime assumes that tm is local time. Luckily, it also sets timezone to
@@
-737,8
+733,8
@@
static int bind_xml_stats_handle_zone(int version, xmlDoc *doc, /* {{{ */
nsstats_translation_table_length,
plugin_instance};
nsstats_translation_table_length,
plugin_instance};
- s
snprintf(plugin_instance, sizeof(plugin_instance), "%s-zone-%s"
,
-
view->name,
zone_name);
+ s
nprintf(plugin_instance, sizeof(plugin_instance), "%s-zone-%s", view->name
,
+ zone_name);
if (version == 3) {
list_info_ptr_t list_info = {plugin_instance,
if (version == 3) {
list_info_ptr_t list_info = {plugin_instance,
@@
-868,8
+864,7
@@
static int bind_xml_stats_handle_view(int version, xmlDoc *doc, /* {{{ */
list_info_ptr_t list_info = {plugin_instance,
/* type = */ "dns_qtype"};
list_info_ptr_t list_info = {plugin_instance,
/* type = */ "dns_qtype"};
- ssnprintf(plugin_instance, sizeof(plugin_instance), "%s-qtypes",
- view->name);
+ snprintf(plugin_instance, sizeof(plugin_instance), "%s-qtypes", view->name);
if (version == 3) {
bind_parse_generic_name_attr_value_list(
/* xpath = */ "counters[@type='resqtype']",
if (version == 3) {
bind_parse_generic_name_attr_value_list(
/* xpath = */ "counters[@type='resqtype']",
@@
-891,8
+886,8
@@
static int bind_xml_stats_handle_view(int version, xmlDoc *doc, /* {{{ */
resstats_translation_table_length,
plugin_instance};
resstats_translation_table_length,
plugin_instance};
- s
s
nprintf(plugin_instance, sizeof(plugin_instance), "%s-resolver_stats",
-
view->name);
+ snprintf(plugin_instance, sizeof(plugin_instance), "%s-resolver_stats",
+ view->name);
if (version == 3) {
bind_parse_generic_name_attr_value_list(
"counters[@type='resstats']",
if (version == 3) {
bind_parse_generic_name_attr_value_list(
"counters[@type='resstats']",
@@
-914,8
+909,8
@@
static int bind_xml_stats_handle_view(int version, xmlDoc *doc, /* {{{ */
list_info_ptr_t list_info = {plugin_instance,
/* type = */ "dns_qtype_cached"};
list_info_ptr_t list_info = {plugin_instance,
/* type = */ "dns_qtype_cached"};
- s
s
nprintf(plugin_instance, sizeof(plugin_instance), "%s-cache_rr_sets",
-
view->name);
+ snprintf(plugin_instance, sizeof(plugin_instance), "%s-cache_rr_sets",
+ view->name);
bind_parse_generic_name_value(/* xpath = */ "cache/rrset",
/* callback = */ bind_xml_list_callback,
bind_parse_generic_name_value(/* xpath = */ "cache/rrset",
/* callback = */ bind_xml_list_callback,