From b91378fedc8696c8b88d74de4bd46951834dee57 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Tue, 4 Feb 2014 08:34:05 +0100 Subject: [PATCH] core: use structure itself for sizeof in two malloc --- src/gui/gui-line.c | 4 ++-- 1 file 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);