From 6e654eb751166aacf31d121b7af4e64a37a2ed90 Mon Sep 17 00:00:00 2001 From: Benedikt Heine Date: Fri, 6 Oct 2017 13:05:09 +0200 Subject: [PATCH] Improve usage of string_append --- src/notification.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/notification.c b/src/notification.c index 68bf2eb..3f7d9ae 100644 --- a/src/notification.c +++ b/src/notification.c @@ -522,14 +522,8 @@ int notification_init(notification *n, int id) char *tmp = g_strconcat(n->summary, " ", n->body, NULL); char *tmp_urls = extract_urls(tmp); - if (tmp_urls != NULL) { - if (n->urls != NULL) { - n->urls = string_append(n->urls, tmp_urls, "\n"); - g_free(tmp_urls); - } else { - n->urls = tmp_urls; - } - } + n->urls = string_append(n->urls, tmp_urls, "\n"); + g_free(tmp_urls); if (n->actions) { n->actions->dmenu_str = NULL;