From 1cff3a46cb5157c53ca531d65811aa39e8c4e8f2 Mon Sep 17 00:00:00 2001 From: Evangelos Ribeiro Tzaras Date: Wed, 3 May 2023 10:39:17 +0200 Subject: [PATCH] sip-origin: Use STR_IS_NULL_OR_EMPTY --- plugins/provider/sip/calls-sip-origin.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/provider/sip/calls-sip-origin.c b/plugins/provider/sip/calls-sip-origin.c index 3576213..d9929e6 100644 --- a/plugins/provider/sip/calls-sip-origin.c +++ b/plugins/provider/sip/calls-sip-origin.c @@ -40,6 +40,7 @@ #include "calls-sip-media-manager.h" #include "calls-sip-origin.h" #include "calls-sip-util.h" +#include "calls-util.h" #include "enum-types.h" #include @@ -956,7 +957,7 @@ setup_nua (CallsSipOrigin *self) g_autofree char *sips_url = NULL; g_autofree char *from_str = NULL; - if (!sip_test_env || sip_test_env[0] == '\0') { + if (!STR_IS_NULL_OR_EMPTY (sip_test_env)) { CallsNetworkWatch *nw = calls_network_watch_get_default (); if (nw) { ipv4_bind = calls_network_watch_get_ipv4 (nw); @@ -1294,7 +1295,7 @@ update_name (CallsSipOrigin *self) { g_assert (CALLS_IS_SIP_ORIGIN (self)); - if (self->display_name && self->display_name[0] != '\0') + if (!STR_IS_NULL_OR_EMPTY (self->display_name)) self->name = self->display_name; else self->name = self->user;