]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
abstract_jb.c: Remove redundant timer check per static analysis.
authorSean Bright <sean@seanbright.com>
Mon, 1 Dec 2025 20:28:04 +0000 (15:28 -0500)
committergithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Wed, 3 Dec 2025 13:58:30 +0000 (13:58 +0000)
While this check is technically unnecessary, it also was not harmful.

The 2 other items mentioned in the linked issue are false positives
and require no action.

Resolves: #1417

main/abstract_jb.c

index 03dd0226c0693094408d02eaf3489438e6c82d13..6fda9dfb9d26df969a3b3f2ebd47798321197795 100644 (file)
@@ -966,7 +966,7 @@ static struct ast_frame *hook_event_cb(struct ast_channel *chan, struct ast_fram
                return frame;
        }
 
-       if (ast_channel_fdno(chan) == AST_JITTERBUFFER_FD && framedata->timer) {
+       if (ast_channel_fdno(chan) == AST_JITTERBUFFER_FD) {
                if (ast_timer_ack(framedata->timer, 1) < 0) {
                        ast_log(LOG_ERROR, "Failed to acknowledge timer in jitter buffer\n");
                        return frame;