From b202e3be5be50f3de8c938d5accc376c403ff0c3 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 --- libburn/read.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/libburn/read.c b/libburn/read.c index 4dca553..e404ec2 100644 --- a/libburn/read.c +++ b/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 */