diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2017-06-23 12:43:31 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2017-06-23 15:41:39 +0200 |
commit | 8aa85bd31abadedf69947250188795fad598dedd (patch) | |
tree | 50b6a5ac4a26ee87d95a1fc2a2ccd1fb4aea5c10 /src | |
parent | b3be964d1cdddabb0f01172bbdae26914b738e45 (diff) |
control_cmd.c: Fix unsigned 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
Diffstat (limited to 'src')
-rw-r--r-- | src/ctrl/control_cmd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ctrl/control_cmd.c b/src/ctrl/control_cmd.c index 836bb717..24b388b3 100644 --- a/src/ctrl/control_cmd.c +++ b/src/ctrl/control_cmd.c @@ -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"; |