diff options
author | Chris Hall <chris.hall@highwayman.com> | 2010-12-21 11:12:30 +0000 |
---|---|---|
committer | Chris Hall <chris.hall@highwayman.com> | 2010-12-21 11:12:30 +0000 |
commit | 121f2f888e02a28e7896f84dde019cb320f0b11d (patch) | |
tree | 99c3913759b80894b1cb83a508036223b9c98f5a /lib/vio_fifo.c | |
parent | d475a0f198f880595eb27e44008e5de3aad25d73 (diff) | |
download | quagga-121f2f888e02a28e7896f84dde019cb320f0b11d.tar.bz2 quagga-121f2f888e02a28e7896f84dde019cb320f0b11d.tar.xz |
Creation of pipework branch
Diffstat (limited to 'lib/vio_fifo.c')
-rw-r--r-- | lib/vio_fifo.c | 9 |
1 files changed, 6 insertions, 3 deletions
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 <stddef.h> +#include "misc.h" #include <string.h> #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) ; |