From 57323fa71effad75d78b36a45d5457b1bd782963 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Sun, 23 Mar 2008 23:00:04 +0100 Subject: Removed sizeof(char) and useless type casts from void* to another pointer type (patch from Leonid Evdokimov) --- src/plugins/fifo/fifo.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/plugins/fifo') diff --git a/src/plugins/fifo/fifo.c b/src/plugins/fifo/fifo.c index 6bd2e40f0..b79692c15 100644 --- a/src/plugins/fifo/fifo.c +++ b/src/plugins/fifo/fifo.c @@ -78,8 +78,7 @@ fifo_create () if (!fifo_filename) { filename_length = strlen (weechat_home) + 64; - fifo_filename = (char *)malloc (filename_length * - sizeof (char)); + fifo_filename = malloc (filename_length); snprintf (fifo_filename, filename_length, "%s/weechat_fifo_%d", weechat_home, (int) getpid()); @@ -240,8 +239,8 @@ fifo_read () ptr_buf = buffer; if (fifo_unterminated) { - buf2 = (char *)malloc ((strlen (fifo_unterminated) + - strlen (buffer) + 1) * sizeof (char)); + buf2 = malloc (strlen (fifo_unterminated) + + strlen (buffer) + 1); if (buf2) { strcpy (buf2, fifo_unterminated); -- cgit v1.2.3