aboutsummaryrefslogtreecommitdiffstats
path: root/src/keylist.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2013-02-06 16:35:40 +0000
committerWerner Koch <[email protected]>2013-02-06 16:35:40 +0000
commit51fd6d8292cb41d743407e6ac9d86a5ab8e68d8c (patch)
treed431a193f5eece63dba5aa6485416e79f67396cb /src/keylist.c
parentImprove parsing of the GIT revision number. (diff)
downloadgpgme-51fd6d8292cb41d743407e6ac9d86a5ab8e68d8c.tar.gz
gpgme-51fd6d8292cb41d743407e6ac9d86a5ab8e68d8c.zip
Use gpg_error_from_syserror instead of directly accessing errno.
-- Also fixed a couple of minor thing; e.g. save the error before calling cleanup functions. Do not save the errno if only free is called in between.
Diffstat (limited to '')
-rw-r--r--src/keylist.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/keylist.c b/src/keylist.c
index 3d240aa6..465b4720 100644
--- a/src/keylist.c
+++ b/src/keylist.c
@@ -558,7 +558,7 @@ keylist_colon_handler (void *priv, char *line)
{
key->issuer_serial = strdup (field[7]);
if (!key->issuer_serial)
- return gpg_error_from_errno (errno);
+ return gpg_error_from_syserror ();
}
/* Field 9 has the ownertrust. */
@@ -653,7 +653,7 @@ keylist_colon_handler (void *priv, char *line)
if (fields >= 10)
{
if (_gpgme_key_append_name (key, field[9], 1))
- return gpg_error_from_errno (GPG_ERR_ENOMEM); /* FIXME */
+ return gpg_error (GPG_ERR_ENOMEM); /* FIXME */
else
{
if (field[1])
@@ -674,7 +674,7 @@ keylist_colon_handler (void *priv, char *line)
{
subkey->fpr = strdup (field[9]);
if (!subkey->fpr)
- return gpg_error_from_errno (errno);
+ return gpg_error_from_syserror ();
}
}
@@ -683,7 +683,7 @@ keylist_colon_handler (void *priv, char *line)
{
key->chain_id = strdup (field[12]);
if (!key->chain_id)
- return gpg_error_from_errno (errno);
+ return gpg_error_from_syserror ();
}
break;