diff options
author | Max Kellermann <max@duempel.org> | 2014-02-28 22:13:34 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-06-16 19:50:34 +0200 |
commit | 2da0322329643512fdef2131b3e8666989dd8f26 (patch) | |
tree | 3d7109d87ce4bb4d334d421816311881ffdda435 /src/command/AllCommands.cxx | |
parent | fefb35c782141b96a118dc09bddc9d588b4c2d82 (diff) | |
download | mpd-2da0322329643512fdef2131b3e8666989dd8f26.tar.gz mpd-2da0322329643512fdef2131b3e8666989dd8f26.tar.xz mpd-2da0322329643512fdef2131b3e8666989dd8f26.zip |
command: make argc unsigned
Diffstat (limited to '')
-rw-r--r-- | src/command/AllCommands.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/command/AllCommands.cxx b/src/command/AllCommands.cxx index e28a7a135..6143dacdf 100644 --- a/src/command/AllCommands.cxx +++ b/src/command/AllCommands.cxx @@ -60,15 +60,15 @@ struct command { unsigned permission; int min; int max; - CommandResult (*handler)(Client &client, int argc, char **argv); + CommandResult (*handler)(Client &client, unsigned argc, char **argv); }; /* don't be fooled, this is the command handler for "commands" command */ static CommandResult -handle_commands(Client &client, int argc, char *argv[]); +handle_commands(Client &client, unsigned argc, char *argv[]); static CommandResult -handle_not_commands(Client &client, int argc, char *argv[]); +handle_not_commands(Client &client, unsigned argc, char *argv[]); /** * The command registry. @@ -215,7 +215,7 @@ command_available(gcc_unused const Partition &partition, /* don't be fooled, this is the command handler for "commands" command */ static CommandResult handle_commands(Client &client, - gcc_unused int argc, gcc_unused char *argv[]) + gcc_unused unsigned argc, gcc_unused char *argv[]) { const unsigned permission = client.GetPermission(); const struct command *cmd; @@ -233,7 +233,7 @@ handle_commands(Client &client, static CommandResult handle_not_commands(Client &client, - gcc_unused int argc, gcc_unused char *argv[]) + gcc_unused unsigned argc, gcc_unused char *argv[]) { const unsigned permission = client.GetPermission(); const struct command *cmd; @@ -285,10 +285,10 @@ command_lookup(const char *name) static bool command_check_request(const struct command *cmd, Client &client, - unsigned permission, int argc, char *argv[]) + unsigned permission, unsigned argc, char *argv[]) { - int min = cmd->min + 1; - int max = cmd->max + 1; + const unsigned min = cmd->min + 1; + const unsigned max = cmd->max + 1; if (cmd->permission != (permission & cmd->permission)) { command_error(client, ACK_ERROR_PERMISSION, @@ -319,7 +319,7 @@ command_check_request(const struct command *cmd, Client &client, static const struct command * command_checked_lookup(Client &client, unsigned permission, - int argc, char *argv[]) + unsigned argc, char *argv[]) { const struct command *cmd; |