From 2cebcbf9577dcf81b5c3423d976981ee90c2809e Mon Sep 17 00:00:00 2001 From: Evangelos Ribeiro Tzaras Date: Thu, 16 Mar 2023 13:10:46 +0100 Subject: [PATCH] new-call-box: Use STR_IS_NULL_OR_EMPTY macro --- src/calls-new-call-box.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calls-new-call-box.c b/src/calls-new-call-box.c index 99bedf6..b5b6d30 100644 --- a/src/calls-new-call-box.c +++ b/src/calls-new-call-box.c @@ -127,7 +127,7 @@ address_activate_cb (CallsNewCallBox *self) CallsOrigin *origin = get_selected_origin (self); const char *address = gtk_entry_get_text (self->address_entry); - if (origin && address && *address != '\0') + if (origin && !STR_IS_NULL_OR_EMPTY (address)) calls_origin_dial (origin, address); } @@ -138,7 +138,7 @@ address_changed_cb (CallsNewCallBox *self) const char *address = gtk_entry_get_text (self->address_entry); gtk_widget_set_visible (GTK_WIDGET (self->result), - address && *address != '\0'); + !STR_IS_NULL_OR_EMPTY (address)); }