g10: Fix print_pubkey_info new line output.
authorNIIBE Yutaka <gniibe@fsij.org>
Wed, 5 Dec 2018 07:44:59 +0000 (16:44 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Wed, 5 Dec 2018 07:44:59 +0000 (16:44 +0900)
* g10/keylist.c (print_pubkey_info): Reverse the condition.

--

This mistakes were introduced when replacing by estream.

It resulted 'gpg --card-status' from a process with no controlling
terminal fails.

Fixes-commit: fb2ba98963beea249474f5d6d7345cf9b4b7f570
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
g10/keylist.c

index 92a8d4c..0b8aa88 100644 (file)
@@ -212,7 +212,7 @@ print_pubkey_info (ctrl_t ctrl, estream_t fp, PKT_public_key *pk)
   else
     p = get_user_id_native (ctrl, keyid);
 
-  if (fp)
+  if (!fp)
     tty_printf ("\n");
   tty_fprintf (fp, "%s  %s/%s %s %s\n",
                pk->flags.primary? "pub":"sub",