summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2014-02-04 08:34:05 +0100
committerSebastien Helleu <flashcode@flashtux.org>2014-02-04 08:34:05 +0100
commitb91378fedc8696c8b88d74de4bd46951834dee57 (patch)
tree4721457b750c4a7b8e7b164c95c3a54bf93f4d7a
parent944972bc951c03605fbd7a9fd3236e63cfd0fd6d (diff)
downloadweechat-b91378fedc8696c8b88d74de4bd46951834dee57.zip
core: use structure itself for sizeof in two malloc
-rw-r--r--src/gui/gui-line.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/gui-line.c b/src/gui/gui-line.c
index ed9b67a78..f3876101c 100644
--- a/src/gui/gui-line.c
+++ b/src/gui/gui-line.c
@@ -1189,7 +1189,7 @@ gui_line_add (struct t_gui_buffer *buffer, time_t date,
}
/* create data for line */
- new_line_data = malloc (sizeof (*(new_line->data)));
+ new_line_data = malloc (sizeof (*new_line_data));
if (!new_line_data)
{
free (new_line);
@@ -1337,7 +1337,7 @@ gui_line_add_y (struct t_gui_buffer *buffer, int y, const char *message)
return;
}
- new_line_data = malloc (sizeof (*(new_line->data)));
+ new_line_data = malloc (sizeof (*new_line_data));
if (!new_line_data)
{
free (new_line);