Skip to content

Commit

Permalink
kfifo: kfifo_is_{full,empty} should return bools, not ints
Browse files Browse the repository at this point in the history
For consistency with other kfifo routines, return bool, not int.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Cc: Stefani Seibold <stefani@seibold.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Robert P. J. Day authored and Linus Torvalds committed Aug 11, 2010
1 parent ab654ba commit ad9c7ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/linux/kfifo.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ static inline unsigned int kfifo_len(struct kfifo *fifo)
* kfifo_is_empty - returns true if the fifo is empty
* @fifo: the fifo to be used.
*/
static inline __must_check int kfifo_is_empty(struct kfifo *fifo)
static inline __must_check bool kfifo_is_empty(struct kfifo *fifo)
{
return fifo->in == fifo->out;
}
Expand All @@ -180,7 +180,7 @@ static inline __must_check int kfifo_is_empty(struct kfifo *fifo)
* kfifo_is_full - returns true if the fifo is full
* @fifo: the fifo to be used.
*/
static inline __must_check int kfifo_is_full(struct kfifo *fifo)
static inline __must_check bool kfifo_is_full(struct kfifo *fifo)
{
return kfifo_len(fifo) == kfifo_size(fifo);
}
Expand Down

0 comments on commit ad9c7ed

Please sign in to comment.