From 51fd6d8292cb41d743407e6ac9d86a5ab8e68d8c Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 6 Feb 2013 17:35:40 +0100 Subject: 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. --- src/trust-item.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/trust-item.c') diff --git a/src/trust-item.c b/src/trust-item.c index 5a0b5449..f9378c68 100644 --- a/src/trust-item.c +++ b/src/trust-item.c @@ -47,7 +47,7 @@ _gpgme_trust_item_new (gpgme_trust_item_t *r_item) item = calloc (1, sizeof *item); if (!item) - return gpg_error_from_errno (errno); + return gpg_error_from_syserror (); item->_refs = 1; item->keyid = item->_keyid; item->_keyid[16] = '\0'; -- cgit v1.2.3