diff options
author | Max Kellermann <max@duempel.org> | 2009-03-07 21:40:27 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-03-07 21:40:27 +0100 |
commit | eb2e3a554d25b2d829bb435c2f2114e935c236a6 (patch) | |
tree | ecc10d29c0c3313243510bbb7158fd8d3fb3c637 /src/chunk.h | |
parent | f8aebc52b519ef4e9c0324d43d5dc87179ac0193 (diff) | |
download | mpd-eb2e3a554d25b2d829bb435c2f2114e935c236a6.tar.gz mpd-eb2e3a554d25b2d829bb435c2f2114e935c236a6.tar.xz mpd-eb2e3a554d25b2d829bb435c2f2114e935c236a6.zip |
chunk: added music_chunk_is_empty()
Diffstat (limited to 'src/chunk.h')
-rw-r--r-- | src/chunk.h | 6 |
1 files changed, 6 insertions, 0 deletions
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(). |