From d960d488507af2fc7b797864ef9775b97ae96454 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Thu, 6 Mar 2025 14:02:38 -0400 Subject: [PATCH] MT#55283 annotate as non-NULL These must be present. Skip NULL check. Change-Id: Ieced33fbb28ba2ae2c7b874f80a34a41bdc21ab5 --- daemon/call.c | 4 +--- include/call.h | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/daemon/call.c b/daemon/call.c index f4eb46359..71d656eb3 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -72,6 +72,7 @@ static void __call_free(call_t *p); static void __call_cleanup(call_t *c); static void __monologue_stop(struct call_monologue *ml); static void media_stop(struct call_media *m); +__attribute__((nonnull(1, 2, 4))) static void __subscribe_medias_both_ways(struct call_media * a, struct call_media * b, bool is_offer, medias_q *); @@ -3398,9 +3399,6 @@ void __add_media_subscription(struct call_media * which, struct call_media * to, static void __subscribe_medias_both_ways(struct call_media * a, struct call_media * b, bool is_offer, medias_q *medias) { - if (!a || !b) - return; - /* retrieve previous subscriptions to retain attributes */ struct media_subscription *a_ms = call_get_media_subscription(a->media_subscriptions_ht, b); struct media_subscription *b_ms = call_get_media_subscription(b->media_subscriptions_ht, a); diff --git a/include/call.h b/include/call.h index 2384b7247..d40a8d988 100644 --- a/include/call.h +++ b/include/call.h @@ -825,6 +825,7 @@ void __monologue_free(struct call_monologue *m); void __monologue_tag(struct call_monologue *ml, const str *tag); void __monologue_viabranch(struct call_monologue *ml, const str *viabranch); struct packet_stream *__packet_stream_new(call_t *call); +__attribute__((nonnull(1, 2))) void __add_media_subscription(struct call_media * which, struct call_media * to, const struct sink_attrs *attrs); struct media_subscription *call_ml_get_top_ms(struct call_monologue *ml);