From 18173f067f374b42e967b6ea486193218ddf91f0 Mon Sep 17 00:00:00 2001 From: Evangelos Ribeiro Tzaras Date: Sun, 22 Jan 2023 09:59:47 +0100 Subject: [PATCH] sip-provider: Use STR_IS_NULL_OR_EMPTY macro --- plugins/provider/sip/calls-sip-provider.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/plugins/provider/sip/calls-sip-provider.c b/plugins/provider/sip/calls-sip-provider.c index 10e2238..03a7cbe 100644 --- a/plugins/provider/sip/calls-sip-provider.c +++ b/plugins/provider/sip/calls-sip-provider.c @@ -38,6 +38,7 @@ #include "calls-sip-origin.h" #include "calls-sip-provider.h" #include "calls-sip-util.h" +#include "calls-util.h" #include #include @@ -171,16 +172,14 @@ on_origin_pw_looked_up (GObject *source, return; } -#define IS_NULL_OR_EMPTY(x) ((x) == NULL || (x)[0] == '\0') if (!direct_mode && - (IS_NULL_OR_EMPTY (host) || - IS_NULL_OR_EMPTY (user) || - IS_NULL_OR_EMPTY (password))) { + (STR_IS_NULL_OR_EMPTY (host) || + STR_IS_NULL_OR_EMPTY (user) || + STR_IS_NULL_OR_EMPTY (password))) { g_warning ("Host, user and password must not be empty"); return; } -#undef IS_NULL_OR_EMPTY calls_sip_provider_add_origin_full (data->provider, id,