From d5d0160927c9f3f93ece0957c231690d142acd9b Mon Sep 17 00:00:00 2001 From: ray Date: Fri, 16 Jul 2010 17:53:20 +0000 Subject: [PATCH] Combine two diff_output lines into one, from diff. OK stsp xsa nicm --- usr.bin/cvs/diff_internals.c | 14 +++++--------- usr.bin/rcs/diff.c | 14 +++++--------- 2 files changed, 10 insertions(+), 18 deletions(-) diff --git a/usr.bin/cvs/diff_internals.c b/usr.bin/cvs/diff_internals.c index aa072bfb5e2..40e4d744213 100644 --- a/usr.bin/cvs/diff_internals.c +++ b/usr.bin/cvs/diff_internals.c @@ -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"); diff --git a/usr.bin/rcs/diff.c b/usr.bin/rcs/diff.c index 4b806bb5d00..c3f9f27cb91 100644 --- a/usr.bin/rcs/diff.c +++ b/usr.bin/rcs/diff.c @@ -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"); -- 2.20.1