aboutsummaryrefslogtreecommitdiffstats
path: root/tests/gpgscm/ffi.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2016-07-14 08:52:03 +0000
committerWerner Koch <[email protected]>2016-07-14 08:52:03 +0000
commitfb14bf0a95e361b0991067e3aea2902d54be811d (patch)
tree4b48be9ef9bb1ec113825785f01c5fb110735ada /tests/gpgscm/ffi.c
parentbuild: Require latest released libraries (diff)
downloadgnupg-fb14bf0a95e361b0991067e3aea2902d54be811d.tar.gz
gnupg-fb14bf0a95e361b0991067e3aea2902d54be811d.zip
gpgscm: Use kludge to avoid improper use of ffi_schemify_name.
* tests/gpgscm/ffi.c (ffi_schemify_name): Use xstrdup instead of strdup for now. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to '')
-rw-r--r--tests/gpgscm/ffi.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/gpgscm/ffi.c b/tests/gpgscm/ffi.c
index 21beb7609..5494c4d7a 100644
--- a/tests/gpgscm/ffi.c
+++ b/tests/gpgscm/ffi.c
@@ -1110,9 +1110,13 @@ ffi_list2intv (scheme *sc, pointer list, int **intv, size_t *len)
char *
ffi_schemify_name (const char *s, int macro)
{
- char *n = strdup (s), *p;
- if (n == NULL)
- return s;
+ /* Fixme: We should use xtrystrdup and return NULL. However, this
+ * requires a lot more changes. Simply returning S as done
+ * originally is not an option. */
+ char *n = xstrdup (s), *p;
+ /* if (n == NULL) */
+ /* return s; */
+
for (p = n; *p; p++)
{
*p = (char) tolower (*p);