diff options
author | Tobias Stoeckmann <tobias@cvs.openbsd.org> | 2008-01-10 10:08:23 +0000 |
---|---|---|
committer | Tobias Stoeckmann <tobias@cvs.openbsd.org> | 2008-01-10 10:08:23 +0000 |
commit | 0f5cebe91fb780a119496047300ea893bae226c3 (patch) | |
tree | d411a6955ad123193ade15923e0ff9bd79a352a0 /usr.bin/cvs/checkout.c | |
parent | 1791d0588fc7a52ac71ad3cdd7bb28ddb8e53bdb (diff) |
another strcspn() round
Diffstat (limited to 'usr.bin/cvs/checkout.c')
-rw-r--r-- | usr.bin/cvs/checkout.c | 5 |
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", |