aboutsummaryrefslogtreecommitdiffstats
path: root/src/command.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-23 07:19:46 +0200
committerMax Kellermann <max@duempel.org>2008-10-23 07:19:46 +0200
commitbc938603f68d03c2a439a53b581bfc85c218a0e0 (patch)
treea5ba17c8b947fb180974663b703d9fca05022f8d /src/command.c
parent890b0673469c79e3cc076b06a775d1d3f93d594d (diff)
downloadmpd-bc938603f68d03c2a439a53b581bfc85c218a0e0.tar.gz
mpd-bc938603f68d03c2a439a53b581bfc85c218a0e0.tar.xz
mpd-bc938603f68d03c2a439a53b581bfc85c218a0e0.zip
playlist: unsigned integers
There are some integers which have a "magic" -1 value which means "undefined" or "nothing". All others can be converted to unsigned, since they must not contain a negative number.
Diffstat (limited to 'src/command.c')
-rw-r--r--src/command.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/command.c b/src/command.c
index 9c56c29c4..51028622e 100644
--- a/src/command.c
+++ b/src/command.c
@@ -343,7 +343,7 @@ handle_status(struct client *client,
if (song >= 0) {
client_printf(client,
COMMAND_STATUS_SONG ": %i\n"
- COMMAND_STATUS_SONGID ": %i\n",
+ COMMAND_STATUS_SONGID ": %u\n",
song, getPlaylistSongId(song));
}
@@ -415,7 +415,7 @@ handle_add(struct client *client, mpd_unused int argc, char *argv[])
static enum command_return
handle_addid(struct client *client, int argc, char *argv[])
{
- int added_id;
+ unsigned added_id;
enum playlist_result result;
if (strncmp(argv[1], "file:///", 8) == 0)
@@ -441,7 +441,7 @@ handle_addid(struct client *client, int argc, char *argv[])
}
}
- client_printf(client, "Id: %d\n", added_id);
+ client_printf(client, "Id: %u\n", added_id);
return result;
}