diff options
author | Jean-Francois Brousseau <jfb@cvs.openbsd.org> | 2005-05-26 03:14:22 +0000 |
---|---|---|
committer | Jean-Francois Brousseau <jfb@cvs.openbsd.org> | 2005-05-26 03:14:22 +0000 |
commit | 2374e4d3ab8c43e5a58d679ffcaa80e7584c8299 (patch) | |
tree | a1003611da49c9fec2fb39f990560beaab2ca958 /usr.bin | |
parent | f1d77e6ee776eeac66aff3daa13168bc05424007 (diff) |
remove the trailing \n from the ctime() timestamp
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/cvs/import.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/cvs/import.c b/usr.bin/cvs/import.c index d6b1a82403d..5bba3313c39 100644 --- a/usr.bin/cvs/import.c +++ b/usr.bin/cvs/import.c @@ -1,4 +1,4 @@ -/* $OpenBSD: import.c,v 1.21 2005/05/26 03:10:01 jfb Exp $ */ +/* $OpenBSD: import.c,v 1.22 2005/05/26 03:14:21 jfb Exp $ */ /* * Copyright (c) 2004 Joris Vink <joris@openbsd.org> * All rights reserved. @@ -188,6 +188,7 @@ static int cvs_import_remote(CVSFILE *cf, void *arg) { int len; + size_t sz; struct cvsroot *root; char fpath[MAXPATHLEN], repodir[MAXPATHLEN]; char repo[MAXPATHLEN], date[32]; @@ -224,6 +225,9 @@ cvs_import_remote(CVSFILE *cf, void *arg) if (dflag) { ctime_r(&(cf->cf_mtime), date); + sz = strlen(date); + if ((sz > 0) && (date[sz - 1] == '\n')) + date[--sz] = '\0'; if (cvs_sendreq(root, CVS_REQ_CHECKINTIME, date) < 0) return (CVS_EX_PROTO); } |