From 589c982aef3891ade0391c17dfbd76ac53b598fd Mon Sep 17 00:00:00 2001 From: Seven Du Date: Wed, 15 Sep 2021 08:37:00 +0800 Subject: [PATCH] fix build warning warning: address of array 'rr->srv_record' will always evaluate to 'true' --- libsofia-sip-ua/stun/stun_dns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libsofia-sip-ua/stun/stun_dns.c b/libsofia-sip-ua/stun/stun_dns.c index 86ef0b2c..82050bcd 100644 --- a/libsofia-sip-ua/stun/stun_dns.c +++ b/libsofia-sip-ua/stun/stun_dns.c @@ -92,7 +92,7 @@ static void priv_sres_cb(stun_dns_lookup_t *self, for (i = 0; answer && answer[i] != NULL; i++) { sres_srv_record_t *rr = (sres_srv_record_t *) answer[i]->sr_srv; - if (rr && rr->srv_record && rr->srv_record->r_type == sres_type_srv) { + if (rr && rr->srv_record->r_type == sres_type_srv) { const char *tcp_name = STUN_SRV_SERVICE_TCP; const char *udp_name = STUN_SRV_SERVICE_UDP; if ((self->stun_state & stun_dns_tls) == 0 &&