diff options
-rw-r--r-- | usr.bin/rcs/ci.c | 14 | ||||
-rw-r--r-- | usr.bin/rcs/co.c | 4 | ||||
-rw-r--r-- | usr.bin/rcs/diff3.c | 6 | ||||
-rw-r--r-- | usr.bin/rcs/rcs.c | 6 | ||||
-rw-r--r-- | usr.bin/rcs/rcsclean.c | 4 | ||||
-rw-r--r-- | usr.bin/rcs/rcsdiff.c | 6 | ||||
-rw-r--r-- | usr.bin/rcs/rcsmerge.c | 5 | ||||
-rw-r--r-- | usr.bin/rcs/rcsprog.c | 10 | ||||
-rw-r--r-- | usr.bin/rcs/rcsprog.h | 5 | ||||
-rw-r--r-- | usr.bin/rcs/rlog.c | 6 |
10 files changed, 35 insertions, 31 deletions
diff --git a/usr.bin/rcs/ci.c b/usr.bin/rcs/ci.c index 64d55127529..5c505d09455 100644 --- a/usr.bin/rcs/ci.c +++ b/usr.bin/rcs/ci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ci.c,v 1.200 2007/06/26 02:21:02 niallo Exp $ */ +/* $OpenBSD: ci.c,v 1.201 2007/06/30 08:23:49 xsa Exp $ */ /* * Copyright (c) 2005, 2006 Niall O'Higgins <niallo@openbsd.org> * All rights reserved. @@ -344,7 +344,7 @@ checkin_diff_file(struct checkin_params *pb) { char *path1, *path2; BUF *b1, *b2, *b3; - char rbuf[64]; + char rbuf[RCS_REV_BUFSZ]; b1 = b2 = b3 = NULL; rcsnum_tostr(pb->frev, rbuf, sizeof(rbuf)); @@ -405,7 +405,7 @@ out: static char * checkin_getlogmsg(RCSNUM *rev, RCSNUM *rev2, int flags) { - char *rcs_msg, nrev[16], prev[16]; + char *rcs_msg, nrev[RCS_REV_BUFSZ], prev[RCS_REV_BUFSZ]; const char *prompt = "enter log message, terminated with a single '.' or end of file:\n"; RCSNUM *tmprev; @@ -439,7 +439,7 @@ checkin_getlogmsg(RCSNUM *rev, RCSNUM *rev2, int flags) static int checkin_update(struct checkin_params *pb) { - char numb1[64], numb2[64]; + char numb1[RCS_REV_BUFSZ], numb2[RCS_REV_BUFSZ]; struct stat st; BUF *bp; @@ -614,7 +614,7 @@ static int checkin_init(struct checkin_params *pb) { BUF *bp; - char numb[64]; + char numb[RCS_REV_BUFSZ]; int fetchlog = 0; struct stat st; @@ -734,7 +734,7 @@ skipdesc: static int checkin_attach_symbol(struct checkin_params *pb) { - char rbuf[16]; + char rbuf[RCS_REV_BUFSZ]; int ret; if (!(pb->flags & QUIET)) printf("symbol: %s\n", pb->symbol); @@ -771,7 +771,7 @@ checkin_attach_symbol(struct checkin_params *pb) static int checkin_revert(struct checkin_params *pb) { - char rbuf[16]; + char rbuf[RCS_REV_BUFSZ]; rcsnum_tostr(pb->frev, rbuf, sizeof(rbuf)); diff --git a/usr.bin/rcs/co.c b/usr.bin/rcs/co.c index ea47c37d0aa..669cb113589 100644 --- a/usr.bin/rcs/co.c +++ b/usr.bin/rcs/co.c @@ -1,4 +1,4 @@ -/* $OpenBSD: co.c,v 1.107 2007/06/08 16:45:52 xsa Exp $ */ +/* $OpenBSD: co.c,v 1.108 2007/06/30 08:23:49 xsa Exp $ */ /* * Copyright (c) 2005 Joris Vink <joris@openbsd.org> * All rights reserved. @@ -250,7 +250,7 @@ checkout_rev(RCSFILE *file, RCSNUM *frev, const char *dst, int flags, BUF *bp; u_int i; int fd, lcount; - char buf[16]; + char buf[RCS_REV_BUFSZ]; mode_t mode = DEFFILEMODE; struct stat st; struct rcs_delta *rdp; diff --git a/usr.bin/rcs/diff3.c b/usr.bin/rcs/diff3.c index cbe476f17ee..6941edc8527 100644 --- a/usr.bin/rcs/diff3.c +++ b/usr.bin/rcs/diff3.c @@ -1,4 +1,4 @@ -/* $OpenBSD: diff3.c,v 1.21 2007/05/29 00:19:10 ray Exp $ */ +/* $OpenBSD: diff3.c,v 1.22 2007/06/30 08:23:49 xsa Exp $ */ /* * Copyright (C) Caldera International Inc. 2001-2002. @@ -72,7 +72,7 @@ static const char copyright[] = #ifndef lint static const char rcsid[] = - "$OpenBSD: diff3.c,v 1.21 2007/05/29 00:19:10 ray Exp $"; + "$OpenBSD: diff3.c,v 1.22 2007/06/30 08:23:49 xsa Exp $"; #endif /* not lint */ #include <ctype.h> @@ -282,7 +282,7 @@ BUF * rcs_diff3(RCSFILE *rf, char *workfile, RCSNUM *rev1, RCSNUM *rev2, int flags) { int argc; - char *argv[5], r1[16], r2[16]; + char *argv[5], r1[RCS_REV_BUFSZ], r2[RCS_REV_BUFSZ]; char *dp13, *dp23, *path1, *path2, *path3; BUF *b1, *b2, *b3, *d1, *d2, *diffb; size_t dlen, plen; diff --git a/usr.bin/rcs/rcs.c b/usr.bin/rcs/rcs.c index f0a1c24765b..bb605c7989b 100644 --- a/usr.bin/rcs/rcs.c +++ b/usr.bin/rcs/rcs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcs.c,v 1.39 2007/06/13 18:01:22 niallo Exp $ */ +/* $OpenBSD: rcs.c,v 1.40 2007/06/30 08:23:49 xsa Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -369,7 +369,7 @@ void rcs_write(RCSFILE *rfp) { FILE *fp; - char numbuf[64], *fn; + char numbuf[RCS_REV_BUFSZ], *fn; struct rcs_access *ap; struct rcs_sym *symp; struct rcs_branch *brp; @@ -2841,7 +2841,7 @@ int rcs_rev_setlog(RCSFILE *rfp, RCSNUM *rev, const char *logtext) { struct rcs_delta *rdp; - char buf[16]; + char buf[RCS_REV_BUFSZ]; rcsnum_tostr(rev, buf, sizeof(buf)); diff --git a/usr.bin/rcs/rcsclean.c b/usr.bin/rcs/rcsclean.c index 6949e0fe2d9..b0168ab1e51 100644 --- a/usr.bin/rcs/rcsclean.c +++ b/usr.bin/rcs/rcsclean.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcsclean.c,v 1.49 2007/04/16 07:35:10 xsa Exp $ */ +/* $OpenBSD: rcsclean.c,v 1.50 2007/06/30 08:23:49 xsa Exp $ */ /* * Copyright (c) 2005 Joris Vink <joris@openbsd.org> * All rights reserved. @@ -134,7 +134,7 @@ rcsclean_file(char *fname, const char *rev_str) { int fd, match; RCSFILE *file; - char fpath[MAXPATHLEN], numb[64]; + char fpath[MAXPATHLEN], numb[RCS_REV_BUFSZ]; RCSNUM *rev; BUF *b1, *b2; time_t rcs_mtime = -1; diff --git a/usr.bin/rcs/rcsdiff.c b/usr.bin/rcs/rcsdiff.c index 580a0ffee6a..403b9a3fe2d 100644 --- a/usr.bin/rcs/rcsdiff.c +++ b/usr.bin/rcs/rcsdiff.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcsdiff.c,v 1.73 2007/04/26 21:50:17 sobrado Exp $ */ +/* $OpenBSD: rcsdiff.c,v 1.74 2007/06/30 08:23:49 xsa Exp $ */ /* * Copyright (c) 2005 Joris Vink <joris@openbsd.org> * All rights reserved. @@ -282,7 +282,7 @@ rcsdiff_file(RCSFILE *file, RCSNUM *rev, const char *filename, int dflags) struct stat st; char *path1, *path2; BUF *b1, *b2; - char rbuf[64]; + char rbuf[RCS_REV_BUFSZ]; struct tm *tb; struct timeval tv[2], tv2[2]; @@ -372,7 +372,7 @@ rcsdiff_rev(RCSFILE *file, RCSNUM *rev1, RCSNUM *rev2, int dflags) struct timeval tv[2], tv2[2]; BUF *b1, *b2; int ret; - char *path1, *path2, rbuf1[64], rbuf2[64]; + char *path1, *path2, rbuf1[RCS_REV_BUFSZ], rbuf2[RCS_REV_BUFSZ]; ret = D_ERROR; b1 = b2 = NULL; diff --git a/usr.bin/rcs/rcsmerge.c b/usr.bin/rcs/rcsmerge.c index ba0e93cf0d5..9b57b23be80 100644 --- a/usr.bin/rcs/rcsmerge.c +++ b/usr.bin/rcs/rcsmerge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcsmerge.c,v 1.50 2007/02/27 07:59:13 xsa Exp $ */ +/* $OpenBSD: rcsmerge.c,v 1.51 2007/06/30 08:23:49 xsa Exp $ */ /* * Copyright (c) 2005, 2006 Xavier Santolaria <xsa@openbsd.org> * All rights reserved. @@ -37,7 +37,8 @@ int rcsmerge_main(int argc, char **argv) { int fd, ch, flags, kflag, status; - char fpath[MAXPATHLEN], r1[16], r2[16], *rev_str1, *rev_str2; + char fpath[MAXPATHLEN], r1[RCS_REV_BUFSZ], r2[RCS_REV_BUFSZ]; + char *rev_str1, *rev_str2; RCSFILE *file; RCSNUM *rev1, *rev2; BUF *bp; diff --git a/usr.bin/rcs/rcsprog.c b/usr.bin/rcs/rcsprog.c index 0095cff2e57..3f812adfafc 100644 --- a/usr.bin/rcs/rcsprog.c +++ b/usr.bin/rcs/rcsprog.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcsprog.c,v 1.138 2007/04/26 21:51:04 sobrado Exp $ */ +/* $OpenBSD: rcsprog.c,v 1.139 2007/06/30 08:23:49 xsa Exp $ */ /* * Copyright (c) 2005 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -434,7 +434,7 @@ rcs_main(int argc, char **argv) if (rcsflags & RCSPROG_LFLAG) { RCSNUM *rev; const char *username; - char rev_str[16]; + char rev_str[RCS_REV_BUFSZ]; if ((username = getlogin()) == NULL) err(1, "getlogin"); @@ -460,7 +460,7 @@ rcs_main(int argc, char **argv) if (rcsflags & RCSPROG_UFLAG) { RCSNUM *rev; const char *username; - char rev_str[16]; + char rev_str[RCS_REV_BUFSZ]; if ((username = getlogin()) == NULL) err(1, "getlogin"); @@ -490,7 +490,7 @@ rcs_main(int argc, char **argv) if (orange != NULL) { struct rcs_delta *rdp, *nrdp; - char b[16]; + char b[RCS_REV_BUFSZ]; rcs_rev_select(file, orange); for (rdp = TAILQ_FIRST(&(file->rf_delta)); @@ -530,7 +530,7 @@ rcs_attach_symbol(RCSFILE *file, const char *symname) { char *rnum; RCSNUM *rev; - char rbuf[16]; + char rbuf[RCS_REV_BUFSZ]; int rm; rm = 0; diff --git a/usr.bin/rcs/rcsprog.h b/usr.bin/rcs/rcsprog.h index c9636fa6170..be295e4e7ca 100644 --- a/usr.bin/rcs/rcsprog.h +++ b/usr.bin/rcs/rcsprog.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rcsprog.h,v 1.59 2006/08/11 08:18:19 xsa Exp $ */ +/* $OpenBSD: rcsprog.h,v 1.60 2007/06/30 08:23:49 xsa Exp $ */ /* * Copyright (c) 2005 Joris Vink <joris@openbsd.org> * All rights reserved. @@ -35,6 +35,9 @@ #define RCS_DEFAULT_SUFFIX ",v/" #define RCS_TMPDIR_DEFAULT "/tmp" +#define RCS_REV_BUFSZ 64 +#define RCS_TIME_BUFSZ 64 + /* flags specific to ci.c */ #define CI_SYMFORCE (1<<0) #define CI_DEFAULT (1<<1) diff --git a/usr.bin/rcs/rlog.c b/usr.bin/rcs/rlog.c index 2b3d02df091..348eae8873c 100644 --- a/usr.bin/rcs/rlog.c +++ b/usr.bin/rcs/rlog.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rlog.c,v 1.57 2007/02/27 07:59:13 xsa Exp $ */ +/* $OpenBSD: rlog.c,v 1.58 2007/06/30 08:23:49 xsa Exp $ */ /* * Copyright (c) 2005 Joris Vink <joris@openbsd.org> * Copyright (c) 2005, 2006 Xavier Santolaria <xsa@openbsd.org> @@ -173,7 +173,7 @@ rlog_main(int argc, char **argv) static void rlog_file(const char *fname, RCSFILE *file) { - char numb[64]; + char numb[RCS_REV_BUFSZ]; u_int nrev; struct rcs_sym *sym; struct rcs_access *acp; @@ -257,7 +257,7 @@ rlog_rev_print(struct rcs_delta *rdp) { int i, found; struct tm t; - char *author, numb[64], *fmt, timeb[64]; + char *author, numb[RCS_REV_BUFSZ], *fmt, timeb[RCS_TIME_BUFSZ]; struct rcs_argvector *largv, *sargv, *wargv; i = found = 0; |