An explicit cast to size_t for an inline integer, since the two are not the

same on Alpha and lint(1) pointed that out.

lint(1) on the same architecture pointed out how silly a cast to (u_int) to
malloc(3)'s argument was.  Change that to size_t.
This commit is contained in:
Juli Mallett 2002-05-02 05:07:13 +00:00
parent 7f5e4ed359
commit 76ccb81ef2

View File

@ -216,7 +216,7 @@ main(int argc, char **argv)
if (nline <= 0)
errx(1, "insufficient space for command");
if ((bbp = malloc((u_int)nline + 1)) == NULL)
if ((bbp = malloc((size_t)nline + 1)) == NULL)
err(1, "malloc");
ebp = (argp = p = bbp) + nline - 1;
@ -304,7 +304,7 @@ arg1: if (insingle || indouble)
if (avj != av && repls > 0 &&
strstr(*tmp, replstr) != NULL) {
strnsubst(tmp, replstr,
inpline, 255);
inpline, (size_t)255);
repls--;
} else {
*tmp = strdup(*avj);