dirmngr: Minor cleanups.
authorWerner Koch <wk@gnupg.org>
Wed, 25 Mar 2015 18:33:59 +0000 (19:33 +0100)
committerWerner Koch <wk@gnupg.org>
Wed, 25 Mar 2015 18:33:59 +0000 (19:33 +0100)
commit6c701af121782c2feb4ee51e559a7420df00471f
treef79e65da4b951b07ab54ce4dcc9964a2f3421111
parent99ef9cd7f589b51921bfbe8d52735c104ef260e3
dirmngr: Minor cleanups.

* dirmngr/ks-engine-ldap.c [__riscos__]: Remove doubled util.h.
(ldap_to_gpg_err): s/GPG_ERR_GENERAL/GPG_ERR_INTERNAL/.
(tm2ldaptime): Use snprintf.
(ldap_connect): Get error code prior to log_error and and use modern
function.   Use xfree, xtrustrdup etc.
(modlist_lookup): Use GNUPG_GCC_A_USED.
(modlist_free): Use xfree.
--

sprintf has been replaced by snprintf to avoid warnings on some
platforms.

xfree et al. is required so that replacement functions are
used if defined.  For example the Libgcrypt functions which may not be
fully compatible with standard free.

Impossible conditions should use GPG_ERR_INTERNAL.

Signed-off-by: Werner Koch <wk@gnupg.org>
dirmngr/ks-engine-ldap.c
dirmngr/ldap-parse-uri.c