aboutsummaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorKevin Lo <kevlo@FreeBSD.org>2015-03-31 15:03:58 +0000
committerKevin Lo <kevlo@FreeBSD.org>2015-03-31 15:03:58 +0000
commit18463c7749ca34aa42acd955858bd37d6f428620 (patch)
tree9b658964246de91e4d6a3e3d2ac8c646177dfd6c /usr.bin
parentbf55a0034d8a4f2eed9a91a49bb1fb51d43906c5 (diff)
downloadsrc-18463c7749ca34aa42acd955858bd37d6f428620.tar.gz
src-18463c7749ca34aa42acd955858bd37d6f428620.zip
Remove bogus cast.
Notes
Notes: svn path=/head/; revision=280911
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/col/col.c8
-rw-r--r--usr.bin/column/column.c12
2 files changed, 10 insertions, 10 deletions
diff --git a/usr.bin/col/col.c b/usr.bin/col/col.c
index 5221485748c6..e811a5247c6c 100644
--- a/usr.bin/col/col.c
+++ b/usr.bin/col/col.c
@@ -290,7 +290,7 @@ main(int argc, char **argv)
need = l->l_lsize ? l->l_lsize * 2 : 90;
if ((l->l_line = realloc(l->l_line,
(unsigned)need * sizeof(CHAR))) == NULL)
- err(1, (char *)NULL);
+ err(1, NULL);
l->l_lsize = need;
}
c = &l->l_line[l->l_line_len++];
@@ -410,13 +410,13 @@ flush_line(LINE *l)
sorted_size = l->l_lsize;
if ((sorted = realloc(sorted,
(unsigned)sizeof(CHAR) * sorted_size)) == NULL)
- err(1, (char *)NULL);
+ err(1, NULL);
}
if (l->l_max_col >= count_size) {
count_size = l->l_max_col + 1;
if ((count = realloc(count,
(unsigned)sizeof(int) * count_size)) == NULL)
- err(1, (char *)NULL);
+ err(1, NULL);
}
memset(count, 0, sizeof(int) * l->l_max_col + 1);
for (i = nchars, c = l->l_line; --i >= 0; c++)
@@ -510,7 +510,7 @@ alloc_line(void)
if (!line_freelist) {
if ((l = realloc(NULL, sizeof(LINE) * NALLOC)) == NULL)
- err(1, (char *)NULL);
+ err(1, NULL);
line_freelist = l;
for (i = 1; i < NALLOC; i++, l++)
l->l_next = l + 1;
diff --git a/usr.bin/column/column.c b/usr.bin/column/column.c
index bc7aa3261c06..b092deb0d95b 100644
--- a/usr.bin/column/column.c
+++ b/usr.bin/column/column.c
@@ -233,11 +233,11 @@ maketbl(void)
wchar_t *last;
if ((t = tbl = calloc(entries, sizeof(TBL))) == NULL)
- err(1, (char *)NULL);
+ err(1, NULL);
if ((cols = calloc((maxcols = DEFCOLS), sizeof(*cols))) == NULL)
- err(1, (char *)NULL);
+ err(1, NULL);
if ((lens = calloc(maxcols, sizeof(int))) == NULL)
- err(1, (char *)NULL);
+ err(1, NULL);
for (cnt = 0, lp = list; cnt < entries; ++cnt, ++lp, ++t) {
for (coloff = 0, p = *lp;
(cols[coloff] = wcstok(p, separator, &last));
@@ -253,9 +253,9 @@ maketbl(void)
maxcols += DEFCOLS;
}
if ((t->list = calloc(coloff, sizeof(*t->list))) == NULL)
- err(1, (char *)NULL);
+ err(1, NULL);
if ((t->len = calloc(coloff, sizeof(int))) == NULL)
- err(1, (char *)NULL);
+ err(1, NULL);
for (t->cols = coloff; --coloff >= 0;) {
t->list[coloff] = cols[coloff];
t->len[coloff] = width(cols[coloff]);
@@ -284,7 +284,7 @@ input(FILE *fp)
if (!list)
if ((list = calloc((maxentry = DEFNUM), sizeof(*list))) ==
NULL)
- err(1, (char *)NULL);
+ err(1, NULL);
while (fgetws(buf, MAXLINELEN, fp)) {
for (p = buf; *p && iswspace(*p); ++p);
if (!*p)