diff options
Diffstat (limited to 'src/gui/gui-hotlist.c')
-rw-r--r-- | src/gui/gui-hotlist.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/gui-hotlist.c b/src/gui/gui-hotlist.c index 0e541beec..b741d5966 100644 --- a/src/gui/gui-hotlist.c +++ b/src/gui/gui-hotlist.c @@ -207,7 +207,8 @@ gui_hotlist_add (struct t_gui_buffer *buffer, int priority, gui_hotlist_free (&gui_hotlist, &last_gui_hotlist, ptr_hotlist); } - if ((new_hotlist = (struct t_gui_hotlist *) malloc (sizeof (struct t_gui_hotlist))) == NULL) + new_hotlist = (struct t_gui_hotlist *)malloc (sizeof (struct t_gui_hotlist)); + if (!new_hotlist) { log_printf (_("Error: not enough memory to add a buffer to " "hotlist")); @@ -236,7 +237,8 @@ gui_hotlist_dup (struct t_gui_hotlist *hotlist) { struct t_gui_hotlist *new_hotlist; - if ((new_hotlist = (struct t_gui_hotlist *) malloc (sizeof (struct t_gui_hotlist)))) + new_hotlist = (struct t_gui_hotlist *)malloc (sizeof (struct t_gui_hotlist)); + if (new_hotlist) { new_hotlist->priority = hotlist->priority; memcpy (&(new_hotlist->creation_time), &(hotlist->creation_time), |