diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2016-10-21 05:04:46 +0200 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2016-10-21 05:04:46 +0200 |
commit | 6e85ac77af594035137950d801d8a1bacce548a3 (patch) | |
tree | 9886172b88af046b48da1a4be262adc70ded234e /g10/cpr.c | |
parent | agent: Fix saving with FORCE=1. (diff) | |
download | gnupg2-6e85ac77af594035137950d801d8a1bacce548a3.tar.xz gnupg2-6e85ac77af594035137950d801d8a1bacce548a3.zip |
Fix use cases of snprintf.
* agent/call-pinentry.c, agent/call-scd.c, agent/command.c,
build-aux/speedo/w32/g4wihelp.c, common/get-passphrase.c,
dirmngr/dirmngr.c, g10/call-agent.c, g10/cpr.c, g10/keygen.c,
g10/openfile.c, g10/passphrase.c, scd/app-openpgp.c, scd/scdaemon.c,
sm/call-agent.c, sm/call-dirmngr.c, sm/certreqgen.c: Fix assuming C99.
--
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'g10/cpr.c')
-rw-r--r-- | g10/cpr.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -53,9 +53,9 @@ progress_cb (void *ctx, const char *what, int printchar, (void)ctx; if ( printchar == '\n' && !strcmp (what, "primegen") ) - snprintf (buf, sizeof buf -1, "%.20s X 100 100", what ); + snprintf (buf, sizeof buf, "%.20s X 100 100", what ); else - snprintf (buf, sizeof buf -1, "%.20s %c %d %d", + snprintf (buf, sizeof buf, "%.20s %c %d %d", what, printchar=='\n'?'X':printchar, current, total ); write_status_text (STATUS_PROGRESS, buf); } @@ -356,7 +356,7 @@ write_status_begin_signing (gcry_md_hd_t md) ga = map_md_openpgp_to_gcry (i); if (ga && gcry_md_is_enabled (md, ga) && buflen+10 < DIM(buf)) { - snprintf (buf+buflen, DIM(buf) - buflen - 1, + snprintf (buf+buflen, DIM(buf) - buflen, "%sH%d", buflen? " ":"",i); buflen += strlen (buf+buflen); } |