From 369981e5be51723227fc8139a10d30a897ee1145 Mon Sep 17 00:00:00 2001 From: Richard Mudgett Date: Wed, 17 Feb 2016 13:30:06 -0600 Subject: [PATCH] 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 --- main/cel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/cel.c b/main/cel.c index 59a5b7ff78..8531b5989e 100644 --- a/main/cel.c +++ b/main/cel.c @@ -267,7 +267,7 @@ enum ast_cel_event_type ast_cel_str_to_event_type(const char *name) static int ast_cel_track_event(enum ast_cel_event_type et) { - return (eventset & ((int64_t) 1 << et)); + return (eventset & ((int64_t) 1 << et)) ? 1 : 0; } static void parse_events(const char *val) -- 2.47.2