aboutsummaryrefslogtreecommitdiffstats
path: root/src/song.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-08 11:06:26 +0200
committerMax Kellermann <max@duempel.org>2008-10-08 11:06:26 +0200
commit02e8c000d1eaa2ff3c81bf59b8293b8912d5be3c (patch)
treef1fd1baa2590c5bf6e38c6599bcedc6f2d8e8b96 /src/song.c
parent1f9b614850f6e350d1c94021fe3723e918f1d259 (diff)
downloadmpd-02e8c000d1eaa2ff3c81bf59b8293b8912d5be3c.tar.gz
mpd-02e8c000d1eaa2ff3c81bf59b8293b8912d5be3c.tar.xz
mpd-02e8c000d1eaa2ff3c81bf59b8293b8912d5be3c.zip
song: song_file_update() returns bool
Instead of returning 0 or -1, return true on success and false on failure. This seems more natural, and when the C library was designed, there was no "bool" data type.
Diffstat (limited to 'src/song.c')
-rw-r--r--src/song.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/song.c b/src/song.c
index 44aba9736..24fd2d733 100644
--- a/src/song.c
+++ b/src/song.c
@@ -97,7 +97,7 @@ song_free(struct song *song)
free(song);
}
-int
+bool
song_file_update(struct song *song)
{
struct decoder_plugin *plugin;
@@ -120,9 +120,9 @@ song_file_update(struct song *song)
song->tag = plugin->tag_dup(abs_path);
if (song->tag == NULL || song->tag->time < 0)
- return -1;
+ return false;
- return 0;
+ return true;
}
char *