From eb2e3a554d25b2d829bb435c2f2114e935c236a6 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 7 Mar 2009 21:40:27 +0100 Subject: chunk: added music_chunk_is_empty() --- src/chunk.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/chunk.h b/src/chunk.h index b63466102..2136c9349 100644 --- a/src/chunk.h +++ b/src/chunk.h @@ -65,6 +65,12 @@ music_chunk_init(struct music_chunk *chunk); void music_chunk_free(struct music_chunk *chunk); +static inline bool +music_chunk_is_empty(const struct music_chunk *chunk) +{ + return chunk->length == 0 && chunk->tag == NULL; +} + /** * Prepares appending to the music chunk. Returns a buffer where you * may write into. After you are finished, call music_chunk_expand(). -- cgit v1.2.3