]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
Fix printf format warnings
authorViktor Dukhovni <postfix-users@dukhovni.org>
Sat, 19 Mar 2016 18:36:07 +0000 (14:36 -0400)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Thu, 26 May 2016 04:41:56 +0000 (00:41 -0400)
postfix/src/sendmail/sendmail.c
postfix/src/util/line_number.c

index 83dac65af664882bc74ceb26d82aa6d122bf5bbd..39171409aa54e8eb9d2c64d2961c8315ccf4075d 100644 (file)
@@ -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);
 
index 253b3e282eda2258801e92f1cf9c7c2e4e31be77..87c1df5e383c9674f661d4f63c855bf7f4c654ee 100644 (file)
@@ -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));
 }