summaryrefslogtreecommitdiff
path: root/usr.bin/cvs
diff options
context:
space:
mode:
authorXavier Santolaria <xsa@cvs.openbsd.org>2005-08-14 19:49:19 +0000
committerXavier Santolaria <xsa@cvs.openbsd.org>2005-08-14 19:49:19 +0000
commitb89c8a0d48c60ed6bf4440b7b3e217d8df068f42 (patch)
tree17776d313a091a59d8adec3839de5db82044a3be /usr.bin/cvs
parent89e22d556d6a3517beebb02c12e4a465dbb4aadf (diff)
missing casts; ok joris
Diffstat (limited to 'usr.bin/cvs')
-rw-r--r--usr.bin/cvs/buf.c6
-rw-r--r--usr.bin/cvs/diff.c12
-rw-r--r--usr.bin/cvs/file.c4
-rw-r--r--usr.bin/cvs/hist.c4
-rw-r--r--usr.bin/cvs/logmsg.c4
-rw-r--r--usr.bin/cvs/proto.c22
-rw-r--r--usr.bin/cvs/rcs.c4
-rw-r--r--usr.bin/cvs/server.c6
8 files changed, 31 insertions, 31 deletions
diff --git a/usr.bin/cvs/buf.c b/usr.bin/cvs/buf.c
index 3e53bf96b91..5cb31d562a0 100644
--- a/usr.bin/cvs/buf.c
+++ b/usr.bin/cvs/buf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: buf.c,v 1.17 2005/07/29 17:04:42 xsa Exp $ */
+/* $OpenBSD: buf.c,v 1.18 2005/08/14 19:49:18 xsa Exp $ */
/*
* Copyright (c) 2003 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -268,7 +268,7 @@ cvs_buf_putc(BUF *b, int c)
if (bp == (b->cb_buf + b->cb_size)) {
/* extend */
if (!(b->cb_flags & BUF_AUTOEXT) ||
- (cvs_buf_grow(b, BUF_INCR) < 0))
+ (cvs_buf_grow(b, (size_t)BUF_INCR) < 0))
return (-1);
/* the buffer might have been moved */
@@ -338,7 +338,7 @@ cvs_buf_fappend(BUF *b, const char *fmt, ...)
return (-1);
}
- ret = cvs_buf_append(b, str, ret);
+ ret = cvs_buf_append(b, str, (size_t)ret);
free(str);
return (ret);
}
diff --git a/usr.bin/cvs/diff.c b/usr.bin/cvs/diff.c
index 19750dc62e5..c064040a589 100644
--- a/usr.bin/cvs/diff.c
+++ b/usr.bin/cvs/diff.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: diff.c,v 1.54 2005/07/27 16:42:19 xsa Exp $ */
+/* $OpenBSD: diff.c,v 1.55 2005/08/14 19:49:18 xsa Exp $ */
/*
* Copyright (C) Caldera International Inc. 2001-2002.
* All rights reserved.
@@ -841,8 +841,8 @@ files_differ(FILE *f1, FILE *f2)
if (stb1.st_size != stb2.st_size)
return (1);
for (;;) {
- i = fread(buf1, 1, sizeof(buf1), f1);
- j = fread(buf2, 1, sizeof(buf2), f2);
+ i = fread(buf1, (size_t)1, sizeof(buf1), f1);
+ j = fread(buf2, (size_t)1, sizeof(buf2), f2);
if (i != j)
return (1);
if (i == 0 && j == 0) {
@@ -1320,7 +1320,7 @@ ignoreline(char *line)
{
int ret;
- ret = regexec(&ignore_re, line, 0, NULL, 0);
+ ret = regexec(&ignore_re, line, (size_t)0, NULL, 0);
free(line);
return (ret == 0); /* if it matched, it should be ignored. */
}
@@ -1586,7 +1586,7 @@ asciifile(FILE *f)
return (1);
rewind(f);
- cnt = fread(buf, 1, sizeof(buf), f);
+ cnt = fread(buf, (size_t)1, sizeof(buf), f);
for (i = 0; i < cnt; i++)
if (!isprint(buf[i]) && !isspace(buf[i]))
return (0);
@@ -1607,7 +1607,7 @@ match_function(const long *f, int pos, FILE *fp)
nc = f[pos] - f[pos - 1];
if (nc >= sizeof(buf))
nc = sizeof(buf) - 1;
- nc = fread(buf, 1, nc, fp);
+ nc = fread(buf, (size_t)1, nc, fp);
if (nc > 0) {
buf[nc] = '\0';
p = strchr((const char *)buf, '\n');
diff --git a/usr.bin/cvs/file.c b/usr.bin/cvs/file.c
index b31bb1f3074..2adbde03098 100644
--- a/usr.bin/cvs/file.c
+++ b/usr.bin/cvs/file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: file.c,v 1.112 2005/08/11 11:54:42 xsa Exp $ */
+/* $OpenBSD: file.c,v 1.113 2005/08/14 19:49:18 xsa Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -1071,7 +1071,7 @@ cvs_file_sort(struct cvs_flist *flp, u_int nfiles)
size_t nb;
CVSFILE *cf, **cfvec;
- cfvec = (CVSFILE **)calloc(nfiles, sizeof(CVSFILE *));
+ cfvec = (CVSFILE **)calloc((size_t)nfiles, sizeof(CVSFILE *));
if (cfvec == NULL) {
cvs_log(LP_ERRNO, "failed to allocate sorting vector");
return (-1);
diff --git a/usr.bin/cvs/hist.c b/usr.bin/cvs/hist.c
index 6f28ff9e4d4..1ea5cda71f4 100644
--- a/usr.bin/cvs/hist.c
+++ b/usr.bin/cvs/hist.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hist.c,v 1.9 2005/08/02 20:05:42 xsa Exp $ */
+/* $OpenBSD: hist.c,v 1.10 2005/08/14 19:49:18 xsa Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -61,7 +61,7 @@ cvs_hist_open(const char *path)
}
memset(histp, 0, sizeof(*histp));
- histp->chf_buf = (char *)malloc(CVS_HIST_BUFSIZE);
+ histp->chf_buf = (char *)malloc((size_t)CVS_HIST_BUFSIZE);
if (histp->chf_buf == NULL) {
cvs_log(LP_ERRNO,
"failed to allocate CVS history parse buffer");
diff --git a/usr.bin/cvs/logmsg.c b/usr.bin/cvs/logmsg.c
index c7b5f4e6c93..7a919b91787 100644
--- a/usr.bin/cvs/logmsg.c
+++ b/usr.bin/cvs/logmsg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: logmsg.c,v 1.20 2005/08/10 14:49:20 xsa Exp $ */
+/* $OpenBSD: logmsg.c,v 1.21 2005/08/14 19:49:18 xsa Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -110,7 +110,7 @@ cvs_logmsg_open(const char *path)
return (NULL);
}
- bp = cvs_buf_alloc(128, BUF_AUTOEXT);
+ bp = cvs_buf_alloc((size_t)128, BUF_AUTOEXT);
if (bp == NULL) {
(void)fclose(fp);
return (NULL);
diff --git a/usr.bin/cvs/proto.c b/usr.bin/cvs/proto.c
index ada97b4d73f..d8c8f81b842 100644
--- a/usr.bin/cvs/proto.c
+++ b/usr.bin/cvs/proto.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: proto.c,v 1.74 2005/08/10 14:49:20 xsa Exp $ */
+/* $OpenBSD: proto.c,v 1.75 2005/08/14 19:49:18 xsa Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -290,8 +290,8 @@ cvs_connect(struct cvsroot *root)
}
/* make the streams line-buffered */
- (void)setvbuf(root->cr_srvin, NULL, _IOLBF, 0);
- (void)setvbuf(root->cr_srvout, NULL, _IOLBF, 0);
+ (void)setvbuf(root->cr_srvin, NULL, _IOLBF, (size_t)0);
+ (void)setvbuf(root->cr_srvout, NULL, _IOLBF, (size_t)0);
cvs_initlog();
@@ -430,12 +430,12 @@ cvs_req_getvalid(void)
char *vrstr;
BUF *buf;
- buf = cvs_buf_alloc(512, BUF_AUTOEXT);
+ buf = cvs_buf_alloc((size_t)512, BUF_AUTOEXT);
if (buf == NULL)
return (NULL);
cvs_buf_set(buf, cvs_requests[0].req_str,
- strlen(cvs_requests[0].req_str), 0);
+ strlen(cvs_requests[0].req_str), (size_t)0);
for (i = 1; i < CVS_NBREQ; i++) {
if ((cvs_buf_putc(buf, ' ') < 0) ||
@@ -459,7 +459,7 @@ cvs_req_getvalid(void)
return (NULL);
}
- cvs_buf_copy(buf, 0, vrstr, len);
+ cvs_buf_copy(buf, (size_t)0, vrstr, len);
cvs_buf_free(buf);
return (vrstr);
@@ -513,12 +513,12 @@ cvs_resp_getvalid(void)
char *vrstr;
BUF *buf;
- buf = cvs_buf_alloc(512, BUF_AUTOEXT);
+ buf = cvs_buf_alloc((size_t)512, BUF_AUTOEXT);
if (buf == NULL)
return (NULL);
cvs_buf_set(buf, cvs_responses[0].resp_str,
- strlen(cvs_responses[0].resp_str), 0);
+ strlen(cvs_responses[0].resp_str), (size_t)0);
for (i = 1; i < CVS_NBRESP; i++) {
if ((cvs_buf_putc(buf, ' ') < 0) ||
@@ -542,7 +542,7 @@ cvs_resp_getvalid(void)
return (NULL);
}
- cvs_buf_copy(buf, 0, vrstr, len);
+ cvs_buf_copy(buf, (size_t)0, vrstr, len);
cvs_buf_free(buf);
return (vrstr);
@@ -1185,8 +1185,8 @@ cvs_initlog(void)
}
/* make the streams line-buffered */
- setvbuf(cvs_server_inlog, NULL, _IOLBF, 0);
- setvbuf(cvs_server_outlog, NULL, _IOLBF, 0);
+ setvbuf(cvs_server_inlog, NULL, _IOLBF, (size_t)0);
+ setvbuf(cvs_server_outlog, NULL, _IOLBF, (size_t)0);
cvs_server_logon = 1;
diff --git a/usr.bin/cvs/rcs.c b/usr.bin/cvs/rcs.c
index dcc65a27fab..2906624e7bc 100644
--- a/usr.bin/cvs/rcs.c
+++ b/usr.bin/cvs/rcs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcs.c,v 1.58 2005/08/11 14:10:20 xsa Exp $ */
+/* $OpenBSD: rcs.c,v 1.59 2005/08/14 19:49:18 xsa Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -1554,7 +1554,7 @@ rcs_parse(RCSFILE *rfp)
return (-1);
}
- pdp->rp_buf = (char *)malloc(RCS_BUFSIZE);
+ pdp->rp_buf = (char *)malloc((size_t)RCS_BUFSIZE);
if (pdp->rp_buf == NULL) {
rcs_errno = RCS_ERR_ERRNO;
cvs_log(LP_ERRNO, "failed to allocate RCS parser buffer");
diff --git a/usr.bin/cvs/server.c b/usr.bin/cvs/server.c
index 20887c599a1..3d398386610 100644
--- a/usr.bin/cvs/server.c
+++ b/usr.bin/cvs/server.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server.c,v 1.22 2005/08/10 14:49:20 xsa Exp $ */
+/* $OpenBSD: server.c,v 1.23 2005/08/14 19:49:18 xsa Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -81,8 +81,8 @@ cvs_server(int argc, char **argv)
}
/* make sure standard in and standard out are line-buffered */
- (void)setvbuf(stdin, NULL, _IOLBF, 0);
- (void)setvbuf(stdout, NULL, _IOLBF, 0);
+ (void)setvbuf(stdin, NULL, _IOLBF, (size_t)0);
+ (void)setvbuf(stdout, NULL, _IOLBF, (size_t)0);
/* create the temporary directory */
l = snprintf(cvs_server_tmpdir, sizeof(cvs_server_tmpdir),