From 15050ce5fce4ed815503db7c029abb38d08970d6 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Thu, 2 Feb 2017 12:35:59 +0100 Subject: core: Replace all calls to *sprintf by gpgrt_*sprintf. * configure.ac (vasprintf): Remove check. * src/vasprintf.c: Remove file. * src/util.h (vasprintf, asprintf): Remove prototypes. Replace all calls to vasprintf and asprintf by gpgrt_vasprintf or gpgrt_asprintf. Also take care to use gpgrt_free on the returned value. * src/w32-util.c (_gpgme_get_gpgconf_path): Replace a gpgrt_asprintf by _gpgme_strconcat. (snprintf): New macro to use gpgrt_snprintf instead of the system's standard snprintf. Signed-off-by: Werner Koch --- src/w32-util.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/w32-util.c') diff --git a/src/w32-util.c b/src/w32-util.c index ad36c9ac..5b02c7ea 100644 --- a/src/w32-util.c +++ b/src/w32-util.c @@ -577,9 +577,10 @@ _gpgme_get_gpgconf_path (void) "Install Directory"); if (tmp) { - if (gpgrt_asprintf (&dir, "%s\\bin", tmp) == -1) - return NULL; + dir = _gpgme_strconcat (tmp, "\\bin", NULL); free (tmp); + if (!dir) + return NULL; } } if (dir) -- cgit v1.2.3