Combine two diff_output lines into one, from diff.
authorray <ray@openbsd.org>
Fri, 16 Jul 2010 17:53:20 +0000 (17:53 +0000)
committerray <ray@openbsd.org>
Fri, 16 Jul 2010 17:53:20 +0000 (17:53 +0000)
OK stsp xsa nicm

usr.bin/cvs/diff_internals.c
usr.bin/rcs/diff.c

index aa072bf..40e4d74 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: diff_internals.c,v 1.30 2010/07/15 18:23:50 ray Exp $ */
+/*     $OpenBSD: diff_internals.c,v 1.31 2010/07/16 17:53:20 ray Exp $ */
 /*
  * Copyright (C) Caldera International Inc.  2001-2002.
  * All rights reserved.
@@ -1278,10 +1278,8 @@ dump_context_vec(FILE *f1, FILE *f2, int flags)
        diff_output("***************");
        if ((flags & D_PROTOTYPE)) {
                f = match_function(ixold, lowa-1, f1);
-               if (f != NULL) {
-                       diff_output(" ");
-                       diff_output("%s", f);
-               }
+               if (f != NULL)
+                       diff_output(" %s", f);
        }
        diff_output("\n*** ");
        range(lowa, upb, ",");
@@ -1387,10 +1385,8 @@ dump_unified_vec(FILE *f1, FILE *f2, int flags)
        diff_output(" @@");
        if ((flags & D_PROTOTYPE)) {
                f = match_function(ixold, lowa-1, f1);
-               if (f != NULL) {
-                       diff_output(" ");
-                       diff_output("%s", f);
-               }
+               if (f != NULL)
+                       diff_output(" %s", f);
        }
        diff_output("\n");
 
index 4b806bb..c3f9f27 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: diff.c,v 1.29 2010/07/15 18:23:50 ray Exp $   */
+/*     $OpenBSD: diff.c,v 1.30 2010/07/16 17:53:20 ray Exp $   */
 /*
  * Copyright (C) Caldera International Inc.  2001-2002.
  * All rights reserved.
@@ -1209,10 +1209,8 @@ dump_context_vec(FILE *f1, FILE *f2, int flags)
        diff_output("***************");
        if ((flags & D_PROTOTYPE)) {
                f = match_function(ixold, lowa-1, f1);
-               if (f != NULL) {
-                       diff_output(" ");
-                       diff_output("%s", f);
-               }
+               if (f != NULL)
+                       diff_output(" %s", f);
        }
        diff_output("\n*** ");
        range(lowa, upb, ",");
@@ -1318,10 +1316,8 @@ dump_unified_vec(FILE *f1, FILE *f2, int flags)
        diff_output(" @@");
        if ((flags & D_PROTOTYPE)) {
                f = match_function(ixold, lowa-1, f1);
-               if (f != NULL) {
-                       diff_output(" ");
-                       diff_output("%s", f);
-               }
+               if (f != NULL)
+                       diff_output(" %s", f);
        }
        diff_output("\n");