summaryrefslogtreecommitdiffstats
path: root/g10/tofu.c
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2017-04-12 07:47:30 +0200
committerNIIBE Yutaka <gniibe@fsij.org>2017-04-12 07:47:30 +0200
commit7b4edf14bb16fbe786e55b829a208960396ce8df (patch)
tree96cb9123e8f42a7400143e27b3fd301f8bdb1acf /g10/tofu.c
parentgpgscm: Fix test program. (diff)
downloadgnupg2-7b4edf14bb16fbe786e55b829a208960396ce8df.tar.xz
gnupg2-7b4edf14bb16fbe786e55b829a208960396ce8df.zip
common: Simplify format_text.
* common/stringhelp.c (format_text): Don't allow IN_PLACE formatting. * common/stringhelp.h: Change the API with no IN_PLACE. * common/t-stringhelp.c (test_format_text): Follow the change. * g10/gpgcompose.c (show_help): Likewise. * g10/tofu.c (format_conflict_msg_part1, ask_about_binding) (show_statistics, show_warning): Likewise. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to '')
-rw-r--r--g10/tofu.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/g10/tofu.c b/g10/tofu.c
index 9f83fa404..4e12905a0 100644
--- a/g10/tofu.c
+++ b/g10/tofu.c
@@ -1355,7 +1355,7 @@ format_conflict_msg_part1 (int policy, strlist_t conflict_set,
es_fputc (0, fp);
if (es_fclose_snatch (fp, (void **)&tmpstr, NULL))
log_fatal ("error snatching memory stream\n");
- text = format_text (tmpstr, 0, 72, 80);
+ text = format_text (tmpstr, 72, 80);
es_free (tmpstr);
return text;
@@ -1913,7 +1913,7 @@ ask_about_binding (ctrl_t ctrl,
/* TRANSLATORS: Please translate the text found in the source
* file below. We don't directly internationalize that text so
* that we can tweak it without breaking translations. */
- char *text = _("TOFU detected a binding conflict");
+ const char *text = _("TOFU detected a binding conflict");
char *textbuf;
if (!strcmp (text, "TOFU detected a binding conflict"))
{
@@ -1926,7 +1926,7 @@ ask_about_binding (ctrl_t ctrl,
"attack! Before accepting this association, you should talk to or "
"call the person to make sure this new key is legitimate.";
}
- textbuf = format_text (text, 0, 72, 80);
+ textbuf = format_text (text, 72, 80);
es_fprintf (fp, "\n%s\n", textbuf);
xfree (textbuf);
}
@@ -3190,7 +3190,7 @@ show_statistics (tofu_dbs_t dbs,
es_fputc (0, fp);
if (es_fclose_snatch (fp, (void **) &tmpmsg, NULL))
log_fatal ("error snatching memory stream\n");
- msg = format_text (tmpmsg, 0, 72, 80);
+ msg = format_text (tmpmsg, 72, 80);
es_free (tmpmsg);
/* Print a status line but suppress the trailing LF.
@@ -3265,7 +3265,7 @@ show_warning (const char *fingerprint, strlist_t user_id_list)
strlist_length (user_id_list)),
set_policy_command);
- text = format_text (tmpmsg, 0, 72, 80);
+ text = format_text (tmpmsg, 72, 80);
xfree (tmpmsg);
log_string (GPGRT_LOG_INFO, text);
xfree (text);