aboutsummaryrefslogtreecommitdiff
path: root/libpkgconf/client.c
diff options
context:
space:
mode:
Diffstat (limited to 'libpkgconf/client.c')
-rw-r--r--libpkgconf/client.c37
1 files changed, 15 insertions, 22 deletions
diff --git a/libpkgconf/client.c b/libpkgconf/client.c
index bcb6ae8..6529dbd 100644
--- a/libpkgconf/client.c
+++ b/libpkgconf/client.c
@@ -141,12 +141,11 @@ pkgconf_client_deinit(pkgconf_client_t *client)
pkgconf_path_free(&client->dir_list);
pkgconf_cache_free(client);
- /*
- * Added to the original leaking code (reported issue #130).
- */
- pkgconf_path_free(&client->filter_libdirs);
- pkgconf_path_free(&client->filter_includedirs);
-
+ /*
+ * Fix the leak (issue #130 is reported).
+ */
+ pkgconf_path_free(&client->filter_libdirs);
+ pkgconf_path_free(&client->filter_includedirs);
}
/*
@@ -326,23 +325,17 @@ pkgconf_trace(const pkgconf_client_t *client, const char *filename, size_t linen
size_t len;
va_list va;
- // Workaround MinGW bug which doesn't recognize 'z' length modifier
- // (despite the presence of -std=C99 option) which leads to crash.
- //
- // This indeed is an issue with an outdated Windows run-time
- // (msvcrt.dll) where MinGW delegates the function call. The modifier
- // isn't mentioned in the documentation for Visual Studio 2015, but is
- // for the later one.
- //
- // Note that the issue is already reported to pkgconf developers
- // (issue #125) and hopefully will be workarounded.
- //
- // The original line:
- //
- // len = snprintf(errbuf, sizeof errbuf, "%s:%zu [%s]: ", filename, lineno, funcname);
- //
+ /*
+ * Workaround MinGW bug which doesn't recognize 'z' length modifier (despite
+ * the presence of -std=C99 option) which leads to crash (issue #125 is
+ * reported).
+ *
+ * This indeed is an issue with an outdated Windows run-time (msvcrt.dll)
+ * where MinGW delegates the function call. The modifier isn't mentioned in
+ * the documentation for Visual Studio 2015, but is for the later one.
+ */
len = snprintf(errbuf, sizeof errbuf, "%s:%lu [%s]: ",
- filename, (unsigned long)lineno, funcname);
+ filename, (unsigned long)lineno, funcname);
va_start(va, format);
vsnprintf(errbuf + len, sizeof(errbuf) - len, format, va);