summaryrefslogtreecommitdiff
path: root/usr.bin/rcs
diff options
context:
space:
mode:
authorRay Lai <ray@cvs.openbsd.org>2006-05-10 01:10:24 +0000
committerRay Lai <ray@cvs.openbsd.org>2006-05-10 01:10:24 +0000
commit09e2dd50c585446781b6e69a8ea1b145596c9289 (patch)
treefe97c8482796faa5c00301fec6299e027e7136d7 /usr.bin/rcs
parentf85300c7d45262d8c0e442737282d53880483ec9 (diff)
Remove (size_t) casts on integer constants.
We should not cover up lint's shortcomings, especially if they no longer exist. ``This is definately good.'' niallo@.
Diffstat (limited to 'usr.bin/rcs')
-rw-r--r--usr.bin/rcs/ci.c4
-rw-r--r--usr.bin/rcs/diff.c12
-rw-r--r--usr.bin/rcs/diff3.c12
3 files changed, 14 insertions, 14 deletions
diff --git a/usr.bin/rcs/ci.c b/usr.bin/rcs/ci.c
index 867d7963030..4a4ce938e19 100644
--- a/usr.bin/rcs/ci.c
+++ b/usr.bin/rcs/ci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ci.c,v 1.171 2006/05/09 12:33:42 ray Exp $ */
+/* $OpenBSD: ci.c,v 1.172 2006/05/10 01:10:23 ray Exp $ */
/*
* Copyright (c) 2005, 2006 Niall O'Higgins <niallo@openbsd.org>
* All rights reserved.
@@ -346,7 +346,7 @@ checkin_diff_file(struct checkin_params *pb)
goto out;
}
- if ((b3 = rcs_buf_alloc((size_t)128, BUF_AUTOEXT)) == NULL) {
+ if ((b3 = rcs_buf_alloc(128, BUF_AUTOEXT)) == NULL) {
warnx("failed to allocated buffer for diff");
goto out;
}
diff --git a/usr.bin/rcs/diff.c b/usr.bin/rcs/diff.c
index c78b33fe05f..5bd36c76d40 100644
--- a/usr.bin/rcs/diff.c
+++ b/usr.bin/rcs/diff.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: diff.c,v 1.4 2006/05/05 15:47:36 xsa Exp $ */
+/* $OpenBSD: diff.c,v 1.5 2006/05/10 01:10:23 ray Exp $ */
/*
* Copyright (C) Caldera International Inc. 2001-2002.
* All rights reserved.
@@ -409,8 +409,8 @@ files_differ(FILE *f1, FILE *f2)
if (stb1.st_size != stb2.st_size)
return (1);
for (;;) {
- i = fread(buf1, (size_t)1, sizeof(buf1), f1);
- j = fread(buf2, (size_t)1, sizeof(buf2), f2);
+ i = fread(buf1, 1, sizeof(buf1), f1);
+ j = fread(buf2, 1, sizeof(buf2), f2);
if (i != j)
return (1);
if (i == 0 && j == 0) {
@@ -868,7 +868,7 @@ ignoreline(char *line)
{
int ret;
- ret = regexec(&ignore_re, line, (size_t)0, NULL, 0);
+ ret = regexec(&ignore_re, line, 0, NULL, 0);
xfree(line);
return (ret == 0); /* if it matched, it should be ignored. */
}
@@ -1154,7 +1154,7 @@ asciifile(FILE *f)
return (1);
rewind(f);
- cnt = fread(buf, (size_t)1, sizeof(buf), f);
+ cnt = fread(buf, 1, sizeof(buf), f);
for (i = 0; i < cnt; i++)
if (!isprint(buf[i]) && !isspace(buf[i]))
return (0);
@@ -1175,7 +1175,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, (size_t)1, nc, fp);
+ nc = fread(buf, 1, nc, fp);
if (nc > 0) {
buf[nc] = '\0';
p = strchr((const char *)buf, '\n');
diff --git a/usr.bin/rcs/diff3.c b/usr.bin/rcs/diff3.c
index 745694c7ba3..42ba4ea9d79 100644
--- a/usr.bin/rcs/diff3.c
+++ b/usr.bin/rcs/diff3.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: diff3.c,v 1.7 2006/05/08 16:56:40 xsa Exp $ */
+/* $OpenBSD: diff3.c,v 1.8 2006/05/10 01:10:23 ray 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.7 2006/05/08 16:56:40 xsa Exp $";
+ "$OpenBSD: diff3.c,v 1.8 2006/05/10 01:10:23 ray Exp $";
#endif /* not lint */
#include "includes.h"
@@ -181,9 +181,9 @@ rcs_diff3(RCSFILE *rf, char *workfile, RCSNUM *rev1, RCSNUM *rev2, int verbose)
if ((b3 = rcs_getrev(rf, rev2)) == NULL)
goto out;
- d1 = rcs_buf_alloc((size_t)128, BUF_AUTOEXT);
- d2 = rcs_buf_alloc((size_t)128, BUF_AUTOEXT);
- diffb = rcs_buf_alloc((size_t)128, BUF_AUTOEXT);
+ d1 = rcs_buf_alloc(128, BUF_AUTOEXT);
+ d2 = rcs_buf_alloc(128, BUF_AUTOEXT);
+ diffb = rcs_buf_alloc(128, BUF_AUTOEXT);
(void)xasprintf(&path1, "%s/diff1.XXXXXXXXXX", rcs_tmpdir);
(void)xasprintf(&path2, "%s/diff2.XXXXXXXXXX", rcs_tmpdir);
@@ -772,7 +772,7 @@ edscript(int n)
(void)fseek(fp[2], (long)de[n].new.from, 0);
for (k = de[n].new.to-de[n].new.from; k > 0; k-= j) {
j = k > BUFSIZ ? BUFSIZ : k;
- if (fread(block, (size_t)1, (size_t)j,
+ if (fread(block, 1, (size_t)j,
fp[2]) != (size_t)j)
return (-1);
block[j] = '\0';