/* Return the number of bytes of space available in the circular buffer.  */
static unsigned int edge_buf_space_avail(struct edge_buf *eb)
/* Return the number of bytes of space available in the circular buffer.  */
static unsigned int edge_buf_space_avail(struct edge_buf *eb)
{
	if (eb == NULL)
		return 0;
	return ((eb->buf_size + eb->buf_get - eb->buf_put - 1) % eb->buf_size);
}