gpg: Simplify cipher:write_header.
authorWerner Koch <wk@gnupg.org>
Wed, 13 Dec 2017 10:58:51 +0000 (11:58 +0100)
committerWerner Koch <wk@gnupg.org>
Wed, 13 Dec 2017 11:15:40 +0000 (12:15 +0100)
* g10/cipher.c (write_header): Use write_status_printf.

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

index 2677989..409d0ad 100644 (file)
@@ -65,12 +65,8 @@ write_header (cipher_filter_context_t *cfx, iobuf_t a)
         gcry_md_debug (cfx->mdc_hash, "creatmdc");
     }
 
-  {
-    char buf[20];
-
-    snprintf (buf, sizeof buf, "%d %d", ed.mdc_method, cfx->dek->algo);
-    write_status_text (STATUS_BEGIN_ENCRYPTION, buf);
-  }
+  write_status_printf (STATUS_BEGIN_ENCRYPTION, "%d %d",
+                       ed.mdc_method, cfx->dek->algo);
 
   init_packet (&pkt);
   pkt.pkttype = cfx->dek->use_mdc? PKT_ENCRYPTED_MDC : PKT_ENCRYPTED;