From bc938603f68d03c2a439a53b581bfc85c218a0e0 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 23 Oct 2008 07:19:46 +0200 Subject: 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. --- src/command.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/command.c') 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; } -- cgit v1.2.3