=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/rcs/rcsclean.c,v retrieving revision 1.44 retrieving revision 1.45 diff -u -r1.44 -r1.45 --- src/usr.bin/rcs/rcsclean.c 2006/04/26 02:55:13 1.44 +++ src/usr.bin/rcs/rcsclean.c 2006/04/26 21:55:22 1.45 @@ -1,4 +1,4 @@ -/* $OpenBSD: rcsclean.c,v 1.44 2006/04/26 02:55:13 joris Exp $ */ +/* $OpenBSD: rcsclean.c,v 1.45 2006/04/26 21:55:22 joris Exp $ */ /* * Copyright (c) 2005 Joris Vink * All rights reserved. @@ -127,7 +127,7 @@ static void rcsclean_file(char *fname, const char *rev_str) { - int match; + int fd, match; RCSFILE *file; char fpath[MAXPATHLEN], numb[64]; RCSNUM *rev; @@ -138,14 +138,14 @@ file = NULL; rev = NULL; - if (rcs_statfile(fname, fpath, sizeof(fpath), flags) < 0) + if ((fd = rcs_statfile(fname, fpath, sizeof(fpath), flags)) < 0) goto out; - if ((file = rcs_open(fpath, RCS_RDWR)) == NULL) + if ((file = rcs_open(fpath, fd, RCS_RDWR)) == NULL) goto out; if (flags & PRESERVETIME) - rcs_mtime = rcs_get_mtime(file->rf_path); + rcs_mtime = rcs_get_mtime(file); rcs_kwexp_set(file, kflag); @@ -200,8 +200,9 @@ } } + rcs_write(file); if (flags & PRESERVETIME) - rcs_set_mtime(fpath, rcs_mtime); + rcs_set_mtime(file, rcs_mtime); out: if (b1 != NULL)