From 2587d7d738a803099795b1b0637472002ec3f305 Mon Sep 17 00:00:00 2001 From: Evangelos Ribeiro Tzaras Date: Mon, 10 Apr 2023 10:55:55 +0200 Subject: [PATCH] best-match: Don't special case NULL best match We always get a valid best match, even for NULL or empty ids, so there is no more need to special case it. --- src/calls-best-match.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/calls-best-match.c b/src/calls-best-match.c index 93c25c7..11bb6da 100644 --- a/src/calls-best-match.c +++ b/src/calls-best-match.c @@ -475,9 +475,6 @@ calls_best_match_get_primary_info (CallsBestMatch *self) { const char *name; - if (!self) - goto anon; - g_return_val_if_fail (CALLS_IS_BEST_MATCH (self), NULL); name = calls_best_match_get_name (self); @@ -487,7 +484,6 @@ calls_best_match_get_primary_info (CallsBestMatch *self) if (self->phone_number) return self->phone_number; -anon: return _("Anonymous caller"); } @@ -501,9 +497,6 @@ anon: const char * calls_best_match_get_secondary_info (CallsBestMatch *self) { - if (!self) - goto anon; - g_return_val_if_fail (CALLS_IS_BEST_MATCH (self), NULL); if (self->matched_individual) @@ -516,6 +509,5 @@ calls_best_match_get_secondary_info (CallsBestMatch *self) * https://gitlab.gnome.org/GNOME/calls/-/issues/358 */ -anon: return ""; }