summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2016-02-17 13:30:06 -0600
committerRichard Mudgett <rmudgett@digium.com>2016-02-17 14:06:58 -0600
commit30a49b8a6a757d9c748f847fb71562bbbc23e1f9 (patch)
tree1fe2da7f1f2a7ae6bb25da876a3f003b5c9f39c7 /main
parent62282bb8ce15e3e70b3e2fd79834c02911b5f8ff (diff)
cel.c: Fix mismatch in ast_cel_track_event() return type.
The return type of ast_cel_track_event() is not large enough to return all 64 potential bits of the event enable mask. Fortunately, the defined CEL events do not really need all 64 bits and the return value is only used to determine if the requested CEL event is enabled. * Made the ast_cel_track_event() return 0 or 1 only so the return value can fit inside an int type instead of zero or a truncated 64 bit non-zero value. Change-Id: I783d932320db11a95c7bf7636a72b6fe2566904c
Diffstat (limited to 'main')
-rw-r--r--main/cel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/cel.c b/main/cel.c
index f2d516883..a0d0ad723 100644
--- a/main/cel.c
+++ b/main/cel.c
@@ -541,7 +541,7 @@ static int ast_cel_track_event(enum ast_cel_event_type et)
return 0;
}
- return (cfg->general->events & ((int64_t) 1 << et));
+ return (cfg->general->events & ((int64_t) 1 << et)) ? 1 : 0;
}
static int events_handler(const struct aco_option *opt, struct ast_variable *var, void *obj)