aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/tail
diff options
context:
space:
mode:
authorDavid E. O'Brien <obrien@FreeBSD.org>2013-02-08 16:10:16 +0000
committerDavid E. O'Brien <obrien@FreeBSD.org>2013-02-08 16:10:16 +0000
commitd9a447559bc04121f7c6682e64abe67efa154864 (patch)
treeb2f038222ff8a70f687652441df00d2b564c8abe /usr.bin/tail
parent3cbf5f97aafc2b249c509ee1162c47c9b28e591e (diff)
parentfbda3d5daeeb730a49d025b614b35a32f0319718 (diff)
downloadsrc-d9a447559bc04121f7c6682e64abe67efa154864.tar.gz
src-d9a447559bc04121f7c6682e64abe67efa154864.zip
Sync with HEAD.
Notes
Notes: svn path=/projects/bmake/; revision=246555
Diffstat (limited to 'usr.bin/tail')
-rw-r--r--usr.bin/tail/read.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.bin/tail/read.c b/usr.bin/tail/read.c
index 2cff3a39b1d4..79c4fa504351 100644
--- a/usr.bin/tail/read.c
+++ b/usr.bin/tail/read.c
@@ -143,9 +143,8 @@ lines(FILE *fp, const char *fn, off_t off)
char *p, *sp;
int blen, cnt, recno, wrap;
- if ((llines = malloc(off * sizeof(*llines))) == NULL)
- err(1, "malloc");
- bzero(llines, off * sizeof(*llines));
+ if ((llines = calloc(off, sizeof(*llines))) == NULL)
+ err(1, "calloc");
p = sp = NULL;
blen = cnt = recno = wrap = 0;
rc = 0;