aboutsummaryrefslogtreecommitdiffstats
path: root/src/audio_format.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-08 11:03:39 +0200
committerMax Kellermann <max@duempel.org>2008-10-08 11:03:39 +0200
commitb084bc28ede5d397e88a4e2bdad8c07a55069589 (patch)
treed61d58cc73ed7d591df05fee2f4a48682e8d9c8c /src/audio_format.h
parent71351160b1b6fd4203f27f9159ae39a476483e1a (diff)
downloadmpd-b084bc28ede5d397e88a4e2bdad8c07a55069589.tar.gz
mpd-b084bc28ede5d397e88a4e2bdad8c07a55069589.tar.xz
mpd-b084bc28ede5d397e88a4e2bdad8c07a55069589.zip
use the "bool" data type instead of "int"
"bool" should be used in C99 programs for boolean values.
Diffstat (limited to 'src/audio_format.h')
-rw-r--r--src/audio_format.h7
1 files changed, 4 insertions, 3 deletions
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 <stdint.h>
+#include <stdbool.h>
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 &&