control_cmd.c: Fix unsiged comparison against < 0

Fixes following warning:
control_cmd.c:294:16: warning: comparison of unsigned enum expression < 0 is always false [-Wtautological-compare]
        if (cmd->type < 0 || cmd->type == CTRL_TYPE_UNKNOWN) {

Change-Id: I3df8a4f646222337927d9e3cac6d09a8a05cb20c
This commit is contained in:
Pau Espin 2017-06-23 12:43:31 +02:00
parent c8ebc326b2
commit c1122f17d6
1 changed files with 1 additions and 1 deletions

View File

@ -291,7 +291,7 @@ struct ctrl_cmd *ctrl_cmd_parse(void *ctx, struct msgb *msg)
}
cmd->type = get_string_value(ctrl_type_vals, tmp);
if (cmd->type < 0 || cmd->type == CTRL_TYPE_UNKNOWN) {
if ((int)cmd->type < 0 || cmd->type == CTRL_TYPE_UNKNOWN) {
cmd->type = CTRL_TYPE_ERROR;
cmd->id = "err";
cmd->reply = "Request type unknown";