summaryrefslogtreecommitdiffstats
path: root/usr.bin/rcs
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2019-04-26 19:11:01 +0000
committermillert <millert@openbsd.org>2019-04-26 19:11:01 +0000
commit74745a4193549f9442d985fa4270ca823a89211e (patch)
treeee46ff6e438e9462e0489a8d7db22540907da356 /usr.bin/rcs
parentdocument -A (diff)
downloadwireguard-openbsd-74745a4193549f9442d985fa4270ca823a89211e.tar.xz
wireguard-openbsd-74745a4193549f9442d985fa4270ca823a89211e.zip
There was an extra newline in some cases and missing one in others.
OK joris@
Diffstat (limited to 'usr.bin/rcs')
-rw-r--r--usr.bin/rcs/co.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/usr.bin/rcs/co.c b/usr.bin/rcs/co.c
index 34d189e5338..97e23967a9e 100644
--- a/usr.bin/rcs/co.c
+++ b/usr.bin/rcs/co.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: co.c,v 1.124 2019/01/09 18:00:45 joris Exp $ */
+/* $OpenBSD: co.c,v 1.125 2019/04/26 19:11:01 millert Exp $ */
/*
* Copyright (c) 2005 Joris Vink <joris@openbsd.org>
* All rights reserved.
@@ -394,6 +394,12 @@ checkout_rev(RCSFILE *file, RCSNUM *frev, const char *dst, int flags,
!(flags & CO_REVERT))
(void)fprintf(stderr, " (unlocked)\n");
}
+ } else {
+ if (file->rf_ndelta != 0) {
+ if (!(flags & QUIET) && !(flags & NEWFILE) &&
+ !(flags & CO_REVERT))
+ (void)fprintf(stderr, "\n");
+ }
}
if ((flags & (PIPEOUT|FORCE)) == 0 && stat(dst, &st) != -1) {
@@ -444,11 +450,6 @@ checkout_rev(RCSFILE *file, RCSNUM *frev, const char *dst, int flags,
((flags & CO_LOCK) || (flags & CO_UNLOCK))) {
(void)fprintf(stderr, "no revisions, so nothing can be %s\n",
(flags & CO_LOCK) ? "locked" : "unlocked");
- } else if (file->rf_ndelta != 0) {
- /* XXX - Not a good way to detect if a newline is needed. */
- if (!(flags & QUIET) && !(flags & NEWFILE) &&
- !(flags & CO_REVERT))
- (void)fprintf(stderr, "\n");
}
if (flags & CO_LOCK) {