summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/checkout.c
diff options
context:
space:
mode:
authorTobias Stoeckmann <tobias@cvs.openbsd.org>2008-01-10 10:08:23 +0000
committerTobias Stoeckmann <tobias@cvs.openbsd.org>2008-01-10 10:08:23 +0000
commit0f5cebe91fb780a119496047300ea893bae226c3 (patch)
treed411a6955ad123193ade15923e0ff9bd79a352a0 /usr.bin/cvs/checkout.c
parent1791d0588fc7a52ac71ad3cdd7bb28ddb8e53bdb (diff)
another strcspn() round
Diffstat (limited to 'usr.bin/cvs/checkout.c')
-rw-r--r--usr.bin/cvs/checkout.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.bin/cvs/checkout.c b/usr.bin/cvs/checkout.c
index 6fbd875f0a4..c2e892680f5 100644
--- a/usr.bin/cvs/checkout.c
+++ b/usr.bin/cvs/checkout.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: checkout.c,v 1.106 2008/01/10 09:54:04 tobias Exp $ */
+/* $OpenBSD: checkout.c,v 1.107 2008/01/10 10:08:22 tobias Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
*
@@ -315,8 +315,7 @@ cvs_checkout_file(struct cvs_file *cf, RCSNUM *rnum, char *tag, int co_flags)
}
asctime_r(gmtime(&rcstime), tbuf);
- if (tbuf[strlen(tbuf) - 1] == '\n')
- tbuf[strlen(tbuf) - 1] = '\0';
+ tbuf[strcspn(tbuf, "\n")] = '\0';
if (co_flags & CO_MERGE) {
(void)xsnprintf(timebuf, sizeof(timebuf), "Result of merge+%s",