diff options
author | Max Kellermann <max@duempel.org> | 2008-10-08 11:06:26 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-08 11:06:26 +0200 |
commit | 02e8c000d1eaa2ff3c81bf59b8293b8912d5be3c (patch) | |
tree | f1fd1baa2590c5bf6e38c6599bcedc6f2d8e8b96 /src/update.c | |
parent | 1f9b614850f6e350d1c94021fe3723e918f1d259 (diff) | |
download | mpd-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 '')
-rw-r--r-- | src/update.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/update.c b/src/update.c index cc2f69843..f4ac7096c 100644 --- a/src/update.c +++ b/src/update.c @@ -232,7 +232,7 @@ updateInDirectory(struct directory *directory, const char *name) return UPDATE_RETURN_UPDATED; } else if (st.st_mtime != song->mtime) { LOG("updating %s\n", name); - if (song_file_update(song) < 0) + if (!song_file_update(song)) delete_song(directory, song); return UPDATE_RETURN_UPDATED; } @@ -421,7 +421,7 @@ static enum update_return updatePath(const char *utf8path) free(path); if (song->mtime == mtime) return UPDATE_RETURN_NOUPDATE; - else if (song_file_update(song) == 0) + else if (song_file_update(song)) return UPDATE_RETURN_UPDATED; else { delete_song(parentDirectory, song); |