diff options
author | peter <peter@FreeBSD.org> | 1996-08-25 21:12:01 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1996-08-25 21:12:01 +0000 |
commit | a5eafc88c57bd29b20f08b371c61fcf2b5df93a6 (patch) | |
tree | c9475df4865da030976237416491e0d5ad8f720f /usr.bin/tail/read.c | |
parent | 86926bee8cab2cfd47a24f582269eef739f4a2ff (diff) | |
download | FreeBSD-src-a5eafc88c57bd29b20f08b371c61fcf2b5df93a6.zip FreeBSD-src-a5eafc88c57bd29b20f08b371c61fcf2b5df93a6.tar.gz |
Argh! caught! *blush*.. This program was supplying it's own 'err' routine
which was slightly different to the libc one. To save any more cunfusion,
use the libc one.
Diffstat (limited to 'usr.bin/tail/read.c')
-rw-r--r-- | usr.bin/tail/read.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/tail/read.c b/usr.bin/tail/read.c index 2b60918..1871c51 100644 --- a/usr.bin/tail/read.c +++ b/usr.bin/tail/read.c @@ -69,7 +69,7 @@ bytes(fp, off) char *sp; if ((sp = p = malloc(off)) == NULL) - err(1, "%s", strerror(errno)); + err(1, "malloc"); for (wrap = 0, ep = p + off; (ch = getc(fp)) != EOF;) { *p = ch; @@ -142,7 +142,7 @@ lines(fp, off) char *sp; if ((lines = malloc(off * sizeof(*lines))) == NULL) - err(1, "%s", strerror(errno)); + err(1, "malloc"); bzero(lines, off * sizeof(*lines)); sp = NULL; blen = cnt = recno = wrap = 0; @@ -150,7 +150,7 @@ lines(fp, off) while ((ch = getc(fp)) != EOF) { if (++cnt > blen) { if ((sp = realloc(sp, blen += 1024)) == NULL) - err(1, "%s", strerror(errno)); + err(1, "realloc"); p = sp + cnt - 1; } *p++ = ch; @@ -159,7 +159,7 @@ lines(fp, off) lines[recno].blen = cnt + 256; if ((lines[recno].l = realloc(lines[recno].l, lines[recno].blen)) == NULL) - err(1, "%s", strerror(errno)); + err(1, "realloc"); } bcopy(sp, lines[recno].l, lines[recno].len = cnt); cnt = 0; |