diff options
author | Xavier Santolaria <xsa@cvs.openbsd.org> | 2006-04-10 08:08:01 +0000 |
---|---|---|
committer | Xavier Santolaria <xsa@cvs.openbsd.org> | 2006-04-10 08:08:01 +0000 |
commit | 6931a528d08a8c9f0cb64dc3dd4f8a2492de405b (patch) | |
tree | 33826c452f4d1e1fa9123732d37e88a3a0baab59 /usr.bin/cvs | |
parent | 5f66dcea266683bbff00705f64acceee5113f98c (diff) |
change rcs_kwexp_set() return type to void and simplify its use. OK niallo@.
Diffstat (limited to 'usr.bin/cvs')
-rw-r--r-- | usr.bin/cvs/admin.c | 6 | ||||
-rw-r--r-- | usr.bin/cvs/rcs.c | 9 | ||||
-rw-r--r-- | usr.bin/cvs/rcs.h | 4 | ||||
-rw-r--r-- | usr.bin/cvs/update.c | 5 |
4 files changed, 10 insertions, 14 deletions
diff --git a/usr.bin/cvs/admin.c b/usr.bin/cvs/admin.c index 35a3af24df1..86272c17ca4 100644 --- a/usr.bin/cvs/admin.c +++ b/usr.bin/cvs/admin.c @@ -1,4 +1,4 @@ -/* $OpenBSD: admin.c,v 1.32 2006/04/01 20:11:25 joris Exp $ */ +/* $OpenBSD: admin.c,v 1.33 2006/04/10 08:08:00 xsa Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * Copyright (c) 2005 Joris Vink <joris@openbsd.org> @@ -365,8 +365,8 @@ cvs_admin_local(CVSFILE *cf, void *arg) if (!(runflags & FLAG_QUIET)) cvs_printf("RCS file: %s\n", rcspath); - if (!RCS_KWEXP_INVAL(kflag)) - rcs_kwexp_set(rf, kflag); + rcs_kwexp_set(rf, kflag); + if (lkmode != RCS_LOCK_INVAL) rcs_lock_setmode(rf, lkmode); diff --git a/usr.bin/cvs/rcs.c b/usr.bin/cvs/rcs.c index 90497032d26..97ccfdefa76 100644 --- a/usr.bin/cvs/rcs.c +++ b/usr.bin/cvs/rcs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcs.c,v 1.161 2006/04/05 01:38:55 ray Exp $ */ +/* $OpenBSD: rcs.c,v 1.162 2006/04/10 08:08:00 xsa Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -1470,16 +1470,15 @@ rcs_findrev(RCSFILE *rfp, RCSNUM *rev) * rcs_kwexp_set() * * Set the keyword expansion mode to use on the RCS file <file> to <mode>. - * Returns 0 on success, or -1 on failure. */ -int +void rcs_kwexp_set(RCSFILE *file, int mode) { int i; char *tmp, buf[8] = ""; if (RCS_KWEXP_INVAL(mode)) - return (-1); + return; i = 0; if (mode == RCS_KWEXP_NONE) @@ -1501,8 +1500,6 @@ rcs_kwexp_set(RCSFILE *file, int mode) file->rf_expand = tmp; /* not synced anymore */ file->rf_flags &= ~RCS_SYNCED; - - return (0); } /* diff --git a/usr.bin/cvs/rcs.h b/usr.bin/cvs/rcs.h index 9e65cc9ebab..1e17701cd0a 100644 --- a/usr.bin/cvs/rcs.h +++ b/usr.bin/cvs/rcs.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rcs.h,v 1.57 2006/03/30 23:06:25 joris Exp $ */ +/* $OpenBSD: rcs.h,v 1.58 2006/04/10 08:08:00 xsa Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -238,7 +238,7 @@ const char *rcs_comment_lookup(const char *); const char *rcs_comment_get(RCSFILE *); void rcs_comment_set(RCSFILE *, const char *); BUF *rcs_kwexp_buf(BUF *, RCSFILE *, RCSNUM *); -int rcs_kwexp_set(RCSFILE *, int); +void rcs_kwexp_set(RCSFILE *, int); int rcs_kwexp_get(RCSFILE *); int rcs_rev_add(RCSFILE *, RCSNUM *, const char *, time_t, const char *); diff --git a/usr.bin/cvs/update.c b/usr.bin/cvs/update.c index 13c2ebf0f99..b9b0ec397e5 100644 --- a/usr.bin/cvs/update.c +++ b/usr.bin/cvs/update.c @@ -1,4 +1,4 @@ -/* $OpenBSD: update.c,v 1.56 2006/03/16 09:06:19 xsa Exp $ */ +/* $OpenBSD: update.c,v 1.57 2006/04/10 08:08:00 xsa Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -257,8 +257,7 @@ cvs_update_local(CVSFILE *cf, void *arg) /* set keyword expansion */ /* XXX look at cf->cf_opts as well for this */ - if (rcs_kwexp_set(rf, kflag) < 0) - fatal("cvs_update_local: rcs_kwexp_set failed"); + rcs_kwexp_set(rf, kflag); /* fill in the correct revision */ if (rev != NULL) { |