From: Romain Bignon Date: Sun, 15 Feb 2009 22:42:34 +0000 (+0100) Subject: range requires unsigned integers. X-Git-Tag: release-0.14~91 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=212e8b7524236b479156565f2bb8035e0de9b123;p=ncmpc.git range requires unsigned integers. --- 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);