Date: Tue, 31 Mar 2015 15:03:59 +0000 (UTC) From: Kevin Lo <kevlo@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280911 - in head/usr.bin: col column Message-ID: <201503311503.t2VF3xAR039037@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kevlo Date: Tue Mar 31 15:03:58 2015 New Revision: 280911 URL: https://svnweb.freebsd.org/changeset/base/280911 Log: Remove bogus cast. Modified: head/usr.bin/col/col.c head/usr.bin/column/column.c Modified: head/usr.bin/col/col.c ============================================================================== --- head/usr.bin/col/col.c Tue Mar 31 14:41:29 2015 (r280910) +++ head/usr.bin/col/col.c Tue Mar 31 15:03:58 2015 (r280911) @@ -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; Modified: head/usr.bin/column/column.c ============================================================================== --- head/usr.bin/column/column.c Tue Mar 31 14:41:29 2015 (r280910) +++ head/usr.bin/column/column.c Tue Mar 31 15:03:58 2015 (r280911) @@ -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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201503311503.t2VF3xAR039037>