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/sig-notation.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/sig-notation.c') 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; } -- cgit v1.2.3