From 54fab5e41b5da1fe1ba14905ed73a86ecd10aaf5 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Sat, 7 Oct 2006 14:58:59 +0000 Subject: [PATCH] Got rid of assert() in read.c by soft means --- trunk/libburn/read.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/trunk/libburn/read.c b/trunk/libburn/read.c index 4dca5537..e404ec24 100644 --- a/trunk/libburn/read.c +++ b/trunk/libburn/read.c @@ -3,7 +3,10 @@ #include #include #include -#include + +/* ts A61007 */ +/* #include */ + #include #include #include @@ -37,11 +40,13 @@ void burn_disc_read(struct burn_drive *d, const struct burn_read_opts *o) struct buffer page; int speed; - assert((o->version & 0xfffff000) == (OPTIONS_VERSION & 0xfffff000)); + /* ts A61007 : if this function gets revived, then these + tests have to be done more graceful */ + a ssert((o->version & 0xfffff000) == (OPTIONS_VERSION & 0xfffff000)); + a ssert(!d->busy); + a ssert(d->toc->valid); + a ssert(o->datafd != -1); - assert(!d->busy); - assert(d->toc->valid); - assert(o->datafd != -1); /* XXX not sure this is a good idea. copy it? */ /* XXX also, we have duplicated data now, do we remove the fds from struct drive, or only store a subset of the _opts structs in drives */