diff options
author | Poul-Henning Kamp <phk@FreeBSD.org> | 2011-02-28 08:59:35 +0000 |
---|---|---|
committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2011-02-28 08:59:35 +0000 |
commit | 54a3365da2703f66892bdfdcb179a742d9ba6bae (patch) | |
tree | 4715b42e2a2b58b4046fbafb1c55c7999b40c99a | |
parent | 00603a0f614b7cc4cef2a62c5c3032d88a376ea8 (diff) | |
download | src-54a3365da2703f66892bdfdcb179a742d9ba6bae.tar.gz src-54a3365da2703f66892bdfdcb179a742d9ba6bae.zip |
Don't override the perfectly good default ->zalloc and ->zfree functions.
Notes
Notes:
svn path=/head/; revision=219094
-rw-r--r-- | usr.sbin/fifolog/lib/fifolog_int.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/usr.sbin/fifolog/lib/fifolog_int.c b/usr.sbin/fifolog/lib/fifolog_int.c index d16e1b77b469..f980f19fcdac 100644 --- a/usr.sbin/fifolog/lib/fifolog_int.c +++ b/usr.sbin/fifolog/lib/fifolog_int.c @@ -43,24 +43,6 @@ #include "libfifolog_int.h" /* - * Memory handling for zlib - */ - -static voidpf -fifo_zalloc(voidpf opaque __unused, uInt items, uInt size) -{ - - return calloc(items,size); -} - -static void -fifo_zfree(voidpf opaque __unused, voidpf address) -{ - - free(address); -} - -/* * Open a fifolog file or partition for reading or writing. * * Return value is NULL for success or a error description string to @@ -88,6 +70,7 @@ fifolog_int_open_i(struct fifolog_file *f, const char *fname, int mode) if (i != 0) { i = fstat(f->fd, &st); + assert(i == 0); if (!S_ISREG(st.st_mode)) return ("Neither disk nor regular file"); f->recsize = 512; @@ -145,8 +128,6 @@ fifolog_int_open_i(struct fifolog_file *f, const char *fname, int mode) f->zs = calloc(sizeof *f->zs, 1); if (f->zs == NULL) return ("cannot malloc"); - f->zs->zalloc = fifo_zalloc; - f->zs->zfree = fifo_zfree; return (NULL); } |