From ca3103ed2cf9b1ce360f64ff7c8b5180ebec7ecd Mon Sep 17 00:00:00 2001 From: Viktor Dukhovni Date: Sat, 19 Mar 2016 14:36:07 -0400 Subject: [PATCH] Fix printf format warnings --- postfix/src/sendmail/sendmail.c | 2 +- postfix/src/util/line_number.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) 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)); } -- 2.47.3