From: Richard Mudgett Date: Wed, 17 Feb 2016 19:30:06 +0000 (-0600) Subject: cel.c: Fix mismatch in ast_cel_track_event() return type. X-Git-Tag: 13.8.0-rc1~67 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a3a857dd62638609ce0d7dbc8d97287f1aa6580;p=thirdparty%2Fasterisk.git 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 --- diff --git a/main/cel.c b/main/cel.c index 0c1e37b689..d9fcc5f6b2 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)