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/gpgme-tool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gpgme-tool.c') diff --git a/src/gpgme-tool.c b/src/gpgme-tool.c index eb1fbb86..eca1906a 100644 --- a/src/gpgme-tool.c +++ b/src/gpgme-tool.c @@ -1614,7 +1614,7 @@ gt_recipients_add (gpgme_tool_t gt, const char *pattern) gpgme_key_t key; if (gt->recipients_nr >= MAX_RECIPIENTS) - return gpg_error_from_errno (ENOMEM); + return gpg_error (GPG_ERR_ENOMEM); if (gpgme_get_protocol (gt->ctx) == GPGME_PROTOCOL_UISERVER) err = gpgme_key_from_uid (&key, pattern); -- cgit v1.2.3