summaryrefslogtreecommitdiffstats
path: root/sm/certdump.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2010-03-24 13:15:30 +0100
committerWerner Koch <wk@gnupg.org>2010-03-24 13:15:30 +0100
commitf080b353ed4ea5c16ad3fda79497a0ebe3be9a7d (patch)
treece173438e276aa2ac40a254e557219ce1a25ba23 /sm/certdump.c
parentReorganized the exechelp code. (diff)
downloadgnupg2-f080b353ed4ea5c16ad3fda79497a0ebe3be9a7d.tar.xz
gnupg2-f080b353ed4ea5c16ad3fda79497a0ebe3be9a7d.zip
More changes for CE. gpgsm does now build and run a keylisting.
Diffstat (limited to 'sm/certdump.c')
-rw-r--r--sm/certdump.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sm/certdump.c b/sm/certdump.c
index d3390702d..6d7d5b68e 100644
--- a/sm/certdump.c
+++ b/sm/certdump.c
@@ -786,7 +786,7 @@ format_name_writer (void *cookie, const void *buffer, size_t size)
else if (c->len + size < c->len)
{
p = NULL;
- errno = ENOMEM;
+ gpg_err_set_errno (ENOMEM);
}
else if (c->size < c->len + size)
{
@@ -804,7 +804,7 @@ format_name_writer (void *cookie, const void *buffer, size_t size)
c->error = errno;
xfree (c->buffer);
c->buffer = NULL;
- errno = c->error;
+ gpg_err_set_errno (c->error);
return -1;
}
memcpy (p + c->len, buffer, size);
@@ -834,8 +834,8 @@ gpgsm_format_name2 (const char *name, int translate)
if (!fp)
{
int save_errno = errno;
- log_error ("error creating memory stream: %s\n", strerror (errno));
- errno = save_errno;
+ log_error ("error creating memory stream: %s\n", strerror (save_errno));
+ gpg_err_set_errno (save_errno);
return NULL;
}
gpgsm_es_print_name2 (fp, name, translate);
@@ -843,7 +843,7 @@ gpgsm_format_name2 (const char *name, int translate)
if (cookie.error || !cookie.buffer)
{
xfree (cookie.buffer);
- errno = cookie.error;
+ gpg_err_set_errno (cookie.error);
return NULL;
}
return cookie.buffer;