From 4352df743fad9fc1dad18ce36073e05b7cfd9246 Mon Sep 17 00:00:00 2001 From: Marc Fournier Date: Wed, 20 Aug 2014 12:27:21 +0200 Subject: [PATCH] openldap: prefer using ldap_err2string() over sstrerror() --- src/openldap.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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); } -- 2.30.2