From: Richard Russon Date: Sun, 26 Nov 2017 02:53:14 +0000 (+0000) Subject: light tidy of format functions X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=05d61df92604bc34cc07278f489f951b6bf44ec6;p=neomutt light tidy of format functions --- diff --git a/compose.c b/compose.c index 71711989b..b1dd75d71 100644 --- a/compose.c +++ b/compose.c @@ -739,8 +739,7 @@ static const char *compose_format_str(char *buf, size_t buflen, size_t col, int break; case 'v': - snprintf(fmt, sizeof(fmt), "NeoMutt %%s%%s"); - snprintf(buf, buflen, fmt, PACKAGE_VERSION, GitVer); + snprintf(buf, buflen, "NeoMutt %s%s", PACKAGE_VERSION, GitVer); break; case 0: diff --git a/ncrypt/crypt_gpgme.c b/ncrypt/crypt_gpgme.c index 6abf5ada7..e02d48bb2 100644 --- a/ncrypt/crypt_gpgme.c +++ b/ncrypt/crypt_gpgme.c @@ -2932,7 +2932,7 @@ static const char *crypt_format_str(char *buf, size_t buflen, size_t col, int co const char *if_str, const char *else_str, unsigned long data, enum FormatFlag flags) { - char fmt[16]; + char fmt[SHORT_STRING]; struct CryptEntry *entry = NULL; struct CryptKeyInfo *key = NULL; int kflags = 0; diff --git a/ncrypt/pgpinvoke.c b/ncrypt/pgpinvoke.c index df7108438..89e801586 100644 --- a/ncrypt/pgpinvoke.c +++ b/ncrypt/pgpinvoke.c @@ -62,7 +62,7 @@ static const char *fmt_pgp_command(char *buf, size_t buflen, size_t col, int col const char *if_str, const char *else_str, unsigned long data, enum FormatFlag flags) { - char fmt[16]; + char fmt[SHORT_STRING]; struct PgpCommandContext *cctx = (struct PgpCommandContext *) data; int optional = (flags & MUTT_FORMAT_OPTIONAL); diff --git a/ncrypt/pgpkey.c b/ncrypt/pgpkey.c index d141559ba..3c2dff4e1 100644 --- a/ncrypt/pgpkey.c +++ b/ncrypt/pgpkey.c @@ -144,7 +144,7 @@ static const char *pgp_entry_fmt(char *buf, size_t buflen, size_t col, int cols, const char *if_str, const char *else_str, unsigned long data, enum FormatFlag flags) { - char fmt[16]; + char fmt[SHORT_STRING]; struct PgpEntry *entry = NULL; struct PgpUid *uid = NULL; struct PgpKeyInfo *key = NULL, *pkey = NULL; diff --git a/ncrypt/smime.c b/ncrypt/smime.c index 99dc61198..7528116d5 100644 --- a/ncrypt/smime.c +++ b/ncrypt/smime.c @@ -164,7 +164,7 @@ static const char *fmt_smime_command(char *buf, size_t buflen, size_t col, int c const char *if_str, const char *else_str, unsigned long data, enum FormatFlag flags) { - char fmt[16]; + char fmt[SHORT_STRING]; struct SmimeCommandContext *cctx = (struct SmimeCommandContext *) data; int optional = (flags & MUTT_FORMAT_OPTIONAL); diff --git a/recvattach.c b/recvattach.c index 8437953bf..2ec2603a7 100644 --- a/recvattach.c +++ b/recvattach.c @@ -181,7 +181,7 @@ const char *attach_format_str(char *buf, size_t buflen, size_t col, int cols, const char *if_str, const char *else_str, unsigned long data, enum FormatFlag flags) { - char fmt[16]; + char fmt[SHORT_STRING]; char tmp[SHORT_STRING]; char charset[SHORT_STRING]; struct AttachPtr *aptr = (struct AttachPtr *) data; diff --git a/remailer.c b/remailer.c index 5f62ba07c..65b7def54 100644 --- a/remailer.c +++ b/remailer.c @@ -378,7 +378,7 @@ static const char *mix_format_str(char *buf, size_t buflen, size_t col, int cols const char *if_str, const char *else_str, unsigned long data, enum FormatFlag flags) { - char fmt[16]; + char fmt[SHORT_STRING]; struct Remailer *remailer = (struct Remailer *) data; int optional = (flags & MUTT_FORMAT_OPTIONAL);