This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch v-0.25.0
in repository enlightenment.
View the commit online.
commit 1c0e17dba3584f05137064d6760151b57833dab0
Author: Carsten Haitzler <ras...@rasterman.com>
AuthorDate: Wed May 18 12:57:24 2022 +0100
popup - simplify buffer alloc for popup body and silence warning
@fix
---
src/modules/notification/e_mod_popup.c | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/src/modules/notification/e_mod_popup.c b/src/modules/notification/e_mod_popup.c
index cc7e821bc..444bc551f 100644
--- a/src/modules/notification/e_mod_popup.c
+++ b/src/modules/notification/e_mod_popup.c
@@ -63,18 +63,20 @@ _notification_popup_merge(E_Notification_Notify *n)
len = strlen(popup->notif->body);
len += strlen(n->body);
len += 5; /* \xE2\x80\xA9 or <PS/> */
- if (len < 8192) body_final = alloca(len + 1);
- else body_final = malloc(len + 1);
- /* Hack to allow e to include markup */
- snprintf(body_final, len + 1, "%s<ps/>%s", popup->notif->body, n->body);
+ body_final = malloc(len + 1);
+ if (body_final)
+ {
+ /* Hack to allow e to include markup */
+ snprintf(body_final, len + 1, "%s<ps/>%s", popup->notif->body, n->body);
- /* printf("set body %s\n", body_final); */
+ /* printf("set body %s\n", body_final); */
- eina_stringshare_replace(&n->body, body_final);
+ eina_stringshare_replace(&n->body, body_final);
- e_object_del(E_OBJECT(popup->notif));
- popup->notif = n;
- if (len >= 8192) free(body_final);
+ e_object_del(E_OBJECT(popup->notif));
+ popup->notif = n;
+ free(body_final);
+ }
return popup;
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.