aboutsummaryrefslogtreecommitdiffstats
path: root/src/command.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-17 23:53:28 +0200
committerMax Kellermann <max@duempel.org>2008-10-17 23:53:28 +0200
commit02a2a407c1d52c6635a551b7a64f1959781aba6d (patch)
tree6d1f796ee72162b8389b8dd6b3c0bc1aed542f55 /src/command.c
parentf8d5b7407160a2c9ec96026b7f7cbd2f4b40afdc (diff)
downloadmpd-02a2a407c1d52c6635a551b7a64f1959781aba6d.tar.gz
mpd-02a2a407c1d52c6635a551b7a64f1959781aba6d.tar.xz
mpd-02a2a407c1d52c6635a551b7a64f1959781aba6d.zip
client: converted permissions to unsigned
client->permission is a bit set, and should be unsigned.
Diffstat (limited to 'src/command.c')
-rw-r--r--src/command.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/command.c b/src/command.c
index 844ce8e9a..0eb285dfc 100644
--- a/src/command.c
+++ b/src/command.c
@@ -138,7 +138,7 @@ struct _CommandEntry {
const char *cmd;
int min;
int max;
- int reqPermission;
+ unsigned reqPermission;
CommandHandlerFunction handler;
};
@@ -272,7 +272,7 @@ static int print_playlist_result(struct client *client,
}
static void addCommand(const char *name,
- int reqPermission,
+ unsigned reqPermission,
int minargs,
int maxargs,
CommandHandlerFunction handler_func)
@@ -1124,7 +1124,7 @@ static int handlePing(mpd_unused struct client *client,
static int handlePassword(struct client *client,
mpd_unused int argc, char *argv[])
{
- int permission = 0;
+ unsigned permission = 0;
if (getPermissionFromPassword(argv[1], &permission) < 0) {
command_error(client, ACK_ERROR_PASSWORD, "incorrect password");
@@ -1192,7 +1192,7 @@ static int handleDevices(struct client *client,
static int handleCommands(struct client *client,
mpd_unused int argc, mpd_unused char *argv[])
{
- const int permission = client_get_permission(client);
+ const unsigned permission = client_get_permission(client);
ListNode *node = commandList->firstNode;
CommandEntry *cmd;
@@ -1211,7 +1211,7 @@ static int handleCommands(struct client *client,
static int handleNotcommands(struct client *client,
mpd_unused int argc, mpd_unused char *argv[])
{
- const int permission = client_get_permission(client);
+ const unsigned permission = client_get_permission(client);
ListNode *node = commandList->firstNode;
CommandEntry *cmd;
@@ -1348,7 +1348,7 @@ void finishCommands(void)
}
static int checkArgcAndPermission(CommandEntry * cmd, struct client *client,
- int permission, int argc, char *argv[])
+ unsigned permission, int argc, char *argv[])
{
int min = cmd->min + 1;
int max = cmd->max + 1;
@@ -1385,7 +1385,7 @@ static int checkArgcAndPermission(CommandEntry * cmd, struct client *client,
}
static CommandEntry *getCommandEntryAndCheckArgcAndPermission(struct client *client,
- int permission,
+ unsigned permission,
int argc,
char *argv[])
{