From: Viktor Dukhovni Date: Sat, 19 Mar 2016 18:36:07 +0000 (-0400) Subject: Fix printf format warnings X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c21a1cf761a518b103270ab3cc6ab7da89b837d7;p=thirdparty%2Fpostfix.git Fix printf format warnings --- diff --git a/postfix/src/sendmail/sendmail.c b/postfix/src/sendmail/sendmail.c index 83dac65af..39171409a 100644 --- a/postfix/src/sendmail/sendmail.c +++ b/postfix/src/sendmail/sendmail.c @@ -906,7 +906,7 @@ static void enqueue(const int flags, const char *encoding, if (rcpt_count == 0) msg_fatal_status(EX_USAGE, (flags & SM_FLAG_XRCPT) ? "%s(%ld): No recipient addresses found in message header" : - "Recipient addresses must be specified on" + "%s(%ld): Recipient addresses must be specified on" " the command line or via the -t option", saved_sender, (long) uid); diff --git a/postfix/src/util/line_number.c b/postfix/src/util/line_number.c index 253b3e282..87c1df5e3 100644 --- a/postfix/src/util/line_number.c +++ b/postfix/src/util/line_number.c @@ -63,8 +63,10 @@ char *format_line_number(VSTRING *result, ssize_t first, ssize_t last) /* * Print a range only when the numbers differ. */ - vstring_sprintf(result, first == last ? "%ld" : "%ld-%ld", - (long) first, (long) last); + if (first == last) + vstring_sprintf(result, "%ld", (long) first); + else + vstring_sprintf(result, "%ld-%ld", (long) first, (long) last); return (vstring_str(result)); }