Remove bogus cast.
This commit is contained in:
parent
ad5d4cffda
commit
a06b60def5
@ -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;
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user