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/engine-assuan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/engine-assuan.c') diff --git a/src/engine-assuan.c b/src/engine-assuan.c index 0963f4af..a3c9e92f 100644 --- a/src/engine-assuan.c +++ b/src/engine-assuan.c @@ -394,7 +394,7 @@ llass_set_locale (void *engine, int category, const char *value) return 0; if (asprintf (&optstr, "OPTION %s=%s", catstr, value) < 0) - err = gpg_error_from_errno (errno); + err = gpg_error_from_syserror (); else { err = assuan_transact (llass->assuan_ctx, optstr, NULL, NULL, -- cgit v1.2.3