diff options
| author | Werner Koch <[email protected]> | 2013-02-06 16:35:40 +0000 | 
|---|---|---|
| committer | Werner Koch <[email protected]> | 2013-02-06 16:35:40 +0000 | 
| commit | 51fd6d8292cb41d743407e6ac9d86a5ab8e68d8c (patch) | |
| tree | d431a193f5eece63dba5aa6485416e79f67396cb /src/passphrase.c | |
| parent | Improve parsing of the GIT revision number. (diff) | |
| download | gpgme-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 'src/passphrase.c')
| -rw-r--r-- | src/passphrase.c | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/src/passphrase.c b/src/passphrase.c index 7e5508eb..00e9d999 100644 --- a/src/passphrase.c +++ b/src/passphrase.c @@ -77,7 +77,7 @@ _gpgme_passphrase_status_handler (void *priv, gpgme_status_code_t code,        if (opd->uid_hint)  	free (opd->uid_hint);        if (!(opd->uid_hint = strdup (args))) -      return gpg_error_from_errno (errno); +        return gpg_error_from_syserror ();        break;      case GPGME_STATUS_BAD_PASSPHRASE: @@ -97,7 +97,7 @@ _gpgme_passphrase_status_handler (void *priv, gpgme_status_code_t code,  	free (opd->passphrase_info);        opd->passphrase_info = strdup (args);        if (!opd->passphrase_info) -	return gpg_error_from_errno (errno); +	return gpg_error_from_syserror ();        break;      case GPGME_STATUS_MISSING_PASSPHRASE: | 
