Improve usage of string_append

This commit is contained in:
Benedikt Heine 2017-10-06 13:05:09 +02:00
parent a6301ff464
commit 6e654eb751

View File

@ -522,14 +522,8 @@ int notification_init(notification *n, int id)
char *tmp = g_strconcat(n->summary, " ", n->body, NULL); char *tmp = g_strconcat(n->summary, " ", n->body, NULL);
char *tmp_urls = extract_urls(tmp); char *tmp_urls = extract_urls(tmp);
if (tmp_urls != NULL) { n->urls = string_append(n->urls, tmp_urls, "\n");
if (n->urls != NULL) { g_free(tmp_urls);
n->urls = string_append(n->urls, tmp_urls, "\n");
g_free(tmp_urls);
} else {
n->urls = tmp_urls;
}
}
if (n->actions) { if (n->actions) {
n->actions->dmenu_str = NULL; n->actions->dmenu_str = NULL;