Code

range requires unsigned integers.
authorRomain Bignon <romain@peerfuse.org>
Sun, 15 Feb 2009 22:42:34 +0000 (23:42 +0100)
committerMax Kellermann <max@duempel.org>
Mon, 16 Feb 2009 19:55:06 +0000 (20:55 +0100)
src/libmpdclient.c
src/libmpdclient.h
src/mpdclient.c
src/mpdclient.h

index ae362a1342ec1a2819cd84d14854dff8b64ac2e4..9a6aeb62543abda73cfb148cfbe8589936dc8ecc 100644 (file)
@@ -1277,9 +1277,9 @@ void mpd_sendShuffleCommand(mpd_Connection * connection) {
        mpd_executeCommand(connection,"shuffle\n");
 }
 
-void mpd_sendShuffleRangeCommand(mpd_Connection * connection, int start, int end) {
+void mpd_sendShuffleRangeCommand(mpd_Connection * connection, unsigned start, unsigned end) {
        char * string = malloc(strlen("shufflerange")+25);
-       sprintf(string,"shuffle \"%i:%i\"\n", start, end);
+       sprintf(string,"shuffle \"%u:%u\"\n", start, end);
        mpd_executeCommand(connection,string);
        free(string);
 }
index 409a178ce81784246f8bbb16b6e2f18087282a5f..0dcbeda0bfcb8dff21163a537d33a278a15421dc 100644 (file)
@@ -423,7 +423,7 @@ void mpd_sendRmCommand(mpd_Connection * connection, const char * name);
 
 void mpd_sendShuffleCommand(mpd_Connection * connection);
 
-void mpd_sendShuffleRangeCommand(mpd_Connection * connection, int start, int end);
+void mpd_sendShuffleRangeCommand(mpd_Connection * connection, unsigned start, unsigned end);
 
 void mpd_sendClearCommand(mpd_Connection * connection);
 
index 809553030df861e066aaffa7f83e4a2044fb95cb..af3057d8e7bbfb0824dc65a067ff30e19a5466e9 100644 (file)
@@ -343,7 +343,7 @@ mpdclient_cmd_shuffle(mpdclient_t *c)
 }
 
 gint
-mpdclient_cmd_shuffle_range(mpdclient_t *c, gint start, gint end)
+mpdclient_cmd_shuffle_range(mpdclient_t *c, guint start, guint end)
 {
        mpd_sendShuffleRangeCommand(c->connection, start, end);
        c->need_update = TRUE;
index d4cabf3585993815446f368a6a135b88299651bd..fe13a2f8536c46ec4ea8e1e17663e789dcf7bddd 100644 (file)
@@ -53,7 +53,7 @@ gint mpdclient_cmd_next(mpdclient_t *c);
 gint mpdclient_cmd_prev(mpdclient_t *c);
 gint mpdclient_cmd_seek(mpdclient_t *c, gint id, gint pos);
 gint mpdclient_cmd_shuffle(mpdclient_t *c);
-gint mpdclient_cmd_shuffle_range(mpdclient_t *c, gint start, gint end);
+gint mpdclient_cmd_shuffle_range(mpdclient_t *c, guint start, guint end);
 gint mpdclient_cmd_clear(mpdclient_t *c);
 gint mpdclient_cmd_repeat(mpdclient_t *c, gint value);
 gint mpdclient_cmd_random(mpdclient_t *c, gint value);