From 212e8b7524236b479156565f2bb8035e0de9b123 Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Sun, 15 Feb 2009 23:42:34 +0100 Subject: [PATCH] range requires unsigned integers. --- src/libmpdclient.c | 4 ++-- src/libmpdclient.h | 2 +- src/mpdclient.c | 2 +- src/mpdclient.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/libmpdclient.c b/src/libmpdclient.c index ae362a1..9a6aeb6 100644 --- a/src/libmpdclient.c +++ b/src/libmpdclient.c @@ -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); } diff --git a/src/libmpdclient.h b/src/libmpdclient.h index 409a178..0dcbeda 100644 --- a/src/libmpdclient.h +++ b/src/libmpdclient.h @@ -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); diff --git a/src/mpdclient.c b/src/mpdclient.c index 8095530..af3057d 100644 --- a/src/mpdclient.c +++ b/src/mpdclient.c @@ -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; diff --git a/src/mpdclient.h b/src/mpdclient.h index d4cabf3..fe13a2f 100644 --- a/src/mpdclient.h +++ b/src/mpdclient.h @@ -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); -- 2.30.2