From: Marc Fournier Date: Wed, 20 Aug 2014 10:27:21 +0000 (+0200) Subject: openldap: prefer using ldap_err2string() over sstrerror() X-Git-Tag: collectd-5.5.0~152^2~9 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=4352df743fad9fc1dad18ce36073e05b7cfd9246;p=collectd.git openldap: prefer using ldap_err2string() over sstrerror() --- diff --git a/src/openldap.c b/src/openldap.c index 08c65033..46d92679 100644 --- a/src/openldap.c +++ b/src/openldap.c @@ -66,9 +66,8 @@ static int ldap_init_host (ldap_t *st) /* {{{ */ rc = ldap_initialize (&ld, st->url); if (rc != LDAP_SUCCESS) { - char errbuf[1024]; - sstrerror (errno, errbuf, sizeof (errbuf)); - ERROR ("ldap_initialize failed: %s", errbuf); + ERROR ("openldap plugin: ldap_initialize failed: %s", + ldap_err2string (rc)); st->state = 0; return (-1); }