From 6ad8619941b8eb79d7ad1d7fe1cf75012fb870d0 Mon Sep 17 00:00:00 2001 From: pixel Date: Fri, 26 Dec 2003 19:05:30 +0000 Subject: Commit of the day --- lib/cdreader.cpp | 7 +++---- lib/cdutils.cpp | 10 +++------- 2 files changed, 6 insertions(+), 11 deletions(-) (limited to 'lib') diff --git a/lib/cdreader.cpp b/lib/cdreader.cpp index 3de92c0..83bd1b3 100644 --- a/lib/cdreader.cpp +++ b/lib/cdreader.cpp @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: cdreader.cpp,v 1.18 2003-12-14 21:14:08 pixel Exp $ */ +/* $Id: cdreader.cpp,v 1.19 2003-12-26 19:05:31 pixel Exp $ */ #include #include @@ -128,20 +128,19 @@ cdreader::~cdreader() { } void cdreader::removetail() { - void * t = (void *) tail; if (!tail) return; sectors[tail->n] = 0; if (head == tail) { - free(t); + free(tail); head = tail = 0; nsectors = 0; } else { cachedsector * p; (p = tail->prev)->next = 0; - free(t); + free(tail); tail = p; nsectors--; } diff --git a/lib/cdutils.cpp b/lib/cdutils.cpp index 9e81c89..4e25aed 100644 --- a/lib/cdutils.cpp +++ b/lib/cdutils.cpp @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: cdutils.cpp,v 1.20 2003-12-12 12:45:20 pixel Exp $ */ +/* $Id: cdutils.cpp,v 1.21 2003-12-26 19:05:31 pixel Exp $ */ #include #include @@ -36,9 +36,7 @@ cdutils::cdutils(Handle * r, Handle * w) : rootDir(0), f_iso_r(r), f_iso_w(w), p cdutils::~cdutils() { if (ppf_file) delete ppf_file; - void * t = rootDir; - free(t); - rootDir = 0; + free(rootDir); } unsigned char cdutils::from_BCD(unsigned char x) { @@ -827,9 +825,7 @@ cdfile::cdfile(cdutils * _cd, int _sector, ssize_t _size, int _mode) : Handle(-1 } cdfile::~cdfile() { - void * t = dir; - free(t); - dir = 0; + free(dir); } ssize_t cdfile::read(void *buf, size_t count) throw (GeneralException) { -- cgit v1.2.3