agent: Minor cleanup for recent change in findkey.c
authorWerner Koch <wk@gnupg.org>
Mon, 24 Oct 2016 11:01:06 +0000 (13:01 +0200)
committerWerner Koch <wk@gnupg.org>
Mon, 24 Oct 2016 11:01:06 +0000 (13:01 +0200)
* agent/findkey.c (agent_write_private_key): Avoid label name error.

Signed-off-by: Werner Koch <wk@gnupg.org>
agent/findkey.c

index 162e8c2..c67dc72 100644 (file)
@@ -157,14 +157,10 @@ agent_write_private_key (const unsigned char *grip,
         {
           fp = es_fopen (fname, "wbx,mode=-rw");
           if (!fp)
-            {
-              tmperr = gpg_error_from_syserror ();
-              goto error;
-            }
+            tmperr = gpg_error_from_syserror ();
         }
-      else
+      if (!fp)
         {
-        error:
           log_error ("can't create '%s': %s\n", fname, gpg_strerror (tmperr));
           xfree (fname);
           return tmperr;