aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/song.c6
-rw-r--r--src/song.h2
-rw-r--r--src/update.c4
3 files changed, 6 insertions, 6 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 *
diff --git a/src/song.h b/src/song.h
index 065b0a1bf..f1e889216 100644
--- a/src/song.h
+++ b/src/song.h
@@ -55,7 +55,7 @@ song_file_load(const char *path, struct directory *parent);
void
song_free(struct song *song);
-int
+bool
song_file_update(struct song *song);
/*
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);