Index: sbin/mount/mount.c =================================================================== --- sbin/mount/mount.c +++ sbin/mount/mount.c @@ -541,7 +541,7 @@ { if (sa->c + 1 == sa->sz) { sa->sz = sa->sz == 0 ? 8 : sa->sz * 2; - sa->a = realloc(sa->a, sizeof(sa->a) * sa->sz); + sa->a = realloc(sa->a, sizeof(*sa->a) * sa->sz); if (sa->a == NULL) errx(1, "realloc failed"); } Index: sbin/umount/umount.c =================================================================== --- sbin/umount/umount.c +++ sbin/umount/umount.c @@ -434,7 +434,7 @@ { static struct statfs *mntbuf; static size_t mntsize = 0; - static char *mntcheck = NULL; + static int *mntcheck = NULL; struct statfs *sfs, *foundsfs; int i, count; Index: usr.bin/column/column.c =================================================================== --- usr.bin/column/column.c +++ usr.bin/column/column.c @@ -244,7 +244,7 @@ p = NULL) if (++coloff == maxcols) { if (!(cols = realloc(cols, ((u_int)maxcols + - DEFCOLS) * sizeof(char *))) || + DEFCOLS) * sizeof(wchar_t *))) || !(lens = realloc(lens, ((u_int)maxcols + DEFCOLS) * sizeof(int)))) err(1, NULL); Index: usr.bin/locate/locate/util.c =================================================================== --- usr.bin/locate/locate/util.c +++ usr.bin/locate/locate/util.c @@ -93,7 +93,7 @@ char **pv; if (dbv == NULL) { - if ((dbv = malloc(sizeof(char **))) == NULL) + if ((dbv = malloc(sizeof(char *))) == NULL) err(1, "malloc"); *dbv = NULL; } @@ -123,7 +123,7 @@ *(p + slen) = '\0'; } /* increase dbv with element p */ - if ((dbv = realloc(dbv, sizeof(char **) * (vlen + 2))) + if ((dbv = realloc(dbv, sizeof(char *) * (vlen + 2))) == NULL) err(1, "realloc"); *(dbv + vlen) = p; Index: usr.bin/xargs/xargs.c =================================================================== --- usr.bin/xargs/xargs.c +++ usr.bin/xargs/xargs.c @@ -234,7 +234,7 @@ * NULL. */ linelen = 1 + argc + nargs + 1; - if ((av = bxp = malloc(linelen * sizeof(char **))) == NULL) + if ((av = bxp = malloc(linelen * sizeof(char *))) == NULL) errx(1, "malloc failed"); /* @@ -471,7 +471,7 @@ * Allocate memory to hold the argument list, and * a NULL at the tail. */ - tmp = malloc((argc + 1) * sizeof(char**)); + tmp = malloc((argc + 1) * sizeof(char *)); if (tmp == NULL) { warnx("malloc failed"); xexit(*argv, 1);