aboutsummaryrefslogtreecommitdiffstats
path: root/src/mpdclient.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-15 13:27:30 +0200
committerMax Kellermann <max@duempel.org>2008-09-15 13:27:30 +0200
commite7981e0e28541e5046c40879a4fdbcc308f143ec (patch)
tree86a4fe788f692321e6a6fbaff8d83708ba764234 /src/mpdclient.c
parent6e81a1b3e08a423c6f4c6976aecae915bd1a3f0b (diff)
downloadmpd-e7981e0e28541e5046c40879a4fdbcc308f143ec.tar.gz
mpd-e7981e0e28541e5046c40879a4fdbcc308f143ec.tar.xz
mpd-e7981e0e28541e5046c40879a4fdbcc308f143ec.zip
use size_t and unsigned integers
Diffstat (limited to 'src/mpdclient.c')
-rw-r--r--src/mpdclient.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mpdclient.c b/src/mpdclient.c
index 0533cad95..57b470681 100644
--- a/src/mpdclient.c
+++ b/src/mpdclient.c
@@ -490,7 +490,7 @@ mpdclient_cmd_move(mpdclient_t *c, gint old_index, gint new_index)
mpd_Song *song1, *song2;
if (old_index == new_index || new_index < 0 ||
- new_index >= c->playlist.length)
+ (guint)new_index >= c->playlist.length)
return -1;
song1 = playlist_get_song(c, old_index);
@@ -739,7 +739,7 @@ mpdclient_playlist_update_changes(mpdclient_t *c)
while ((entity = mpd_getNextInfoEntity(c->connection)) != NULL) {
mpd_Song *song = entity->info.song;
- if (song->pos < c->playlist.length) {
+ if (song->pos >= 0 && (guint)song->pos < c->playlist.length) {
GList *item = g_list_nth(c->playlist.list, song->pos);
/* update song */
@@ -756,7 +756,7 @@ mpdclient_playlist_update_changes(mpdclient_t *c)
}
/* remove trailing songs */
- while (c->status->playlistLength < c->playlist.length) {
+ while ((guint)c->status->playlistLength < c->playlist.length) {
GList *item = g_list_last(c->playlist.list);
/* Remove the last playlist entry */