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/sig-notation.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 '')
| -rw-r--r-- | src/sig-notation.c | 6 | 
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sig-notation.c b/src/sig-notation.c index 46efac6d..c747ad62 100644 --- a/src/sig-notation.c +++ b/src/sig-notation.c @@ -79,7 +79,7 @@ _gpgme_sig_notation_create (gpgme_sig_notation_t *notationp,    notation = calloc (1, sizeof (*notation));    if (!notation) -    return gpg_error_from_errno (errno); +    return gpg_error_from_syserror ();    /* This is critical.  We want to reliably identify policy URLs by       using a NULL pointer for NAME.  So all notations must have a NAME @@ -91,7 +91,7 @@ _gpgme_sig_notation_create (gpgme_sig_notation_t *notationp,        notation->name = malloc (name_len + 1);        if (!notation->name)  	{ -	  err = gpg_error_from_errno (errno); +	  err = gpg_error_from_syserror ();  	  goto err;  	} @@ -107,7 +107,7 @@ _gpgme_sig_notation_create (gpgme_sig_notation_t *notationp,        notation->value = malloc (value_len + 1);        if (!notation->value)  	{ -	  err = gpg_error_from_errno (errno); +	  err = gpg_error_from_syserror ();  	  goto err;  	}  | 
