Changes the functions pl2303_buf_clear and pl2303_buf_data_avail for
the purpose of keeping them under the 80 column limit, making them
more similar to similar functions and making then simpler.
Signed-off-by: Thiago Galesi <thiagogalesi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
*/
static unsigned int pl2303_buf_data_avail(struct pl2303_buf *pb)
{
- if (pb != NULL)
- return ((pb->buf_size + pb->buf_put - pb->buf_get) % pb->buf_size);
- else
+ if (pb == NULL)
return 0;
+
+ return ((pb->buf_size + pb->buf_put - pb->buf_get) % pb->buf_size);
}
/*
*/
static unsigned int pl2303_buf_space_avail(struct pl2303_buf *pb)
{
- if (pb != NULL)
- return ((pb->buf_size + pb->buf_get - pb->buf_put - 1) % pb->buf_size);
- else
+ if (pb == NULL)
return 0;
+
+ return ((pb->buf_size + pb->buf_get - pb->buf_put - 1) % pb->buf_size);
}
/*