From b084bc28ede5d397e88a4e2bdad8c07a55069589 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 8 Oct 2008 11:03:39 +0200 Subject: use the "bool" data type instead of "int" "bool" should be used in C99 programs for boolean values. --- src/audio_format.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/audio_format.h') diff --git a/src/audio_format.h b/src/audio_format.h index 1c9caee7d..794ebaaff 100644 --- a/src/audio_format.h +++ b/src/audio_format.h @@ -20,6 +20,7 @@ #define AUDIO_FORMAT_H #include +#include struct audio_format { uint32_t sampleRate; @@ -34,13 +35,13 @@ static inline void audio_format_clear(struct audio_format *af) af->channels = 0; } -static inline int audio_format_defined(const struct audio_format *af) +static inline bool audio_format_defined(const struct audio_format *af) { return af->sampleRate != 0; } -static inline int audio_format_equals(const struct audio_format *a, - const struct audio_format *b) +static inline bool audio_format_equals(const struct audio_format *a, + const struct audio_format *b) { return a->sampleRate == b->sampleRate && a->bits == b->bits && -- cgit v1.2.3