From 121f2f888e02a28e7896f84dde019cb320f0b11d Mon Sep 17 00:00:00 2001 From: Chris Hall Date: Tue, 21 Dec 2010 11:12:30 +0000 Subject: Creation of pipework branch --- lib/vio_fifo.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'lib/vio_fifo.c') diff --git a/lib/vio_fifo.c b/lib/vio_fifo.c index 685f33ec..10c4a343 100644 --- a/lib/vio_fifo.c +++ b/lib/vio_fifo.c @@ -19,7 +19,7 @@ * Boston, MA 02111-1307, USA. */ -#include +#include "misc.h" #include #include "vio_fifo.h" @@ -215,15 +215,18 @@ vio_fifo_ptr_unset(vio_fifo vf) * Clear out contents of FIFO -- will continue to use the FIFO. * * Keeps one FIFO lump. (Frees everything else, including any spare.) + * + * Does nothing if there is no FIFO ! */ extern void vio_fifo_clear(vio_fifo vf) { vio_fifo_lump tail ; - VIO_FIFO_DEBUG_VERIFY(vf) ; + if (vf == NULL) + return ; - assert(vf != NULL) ; + VIO_FIFO_DEBUG_VERIFY(vf) ; tail = ddl_tail(vf->base) ; -- cgit v1.2.3