summaryrefslogtreecommitdiff
path: root/src/plugins/fifo
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2008-03-23 23:00:04 +0100
committerSebastien Helleu <flashcode@flashtux.org>2008-03-23 23:00:04 +0100
commit57323fa71effad75d78b36a45d5457b1bd782963 (patch)
tree50d7a5bacacebcdf59d5bf38dff84c83bf557d31 /src/plugins/fifo
parent14feea7ab84df3e367bc3732e8ba1470e1a3f5a7 (diff)
downloadweechat-57323fa71effad75d78b36a45d5457b1bd782963.zip
Removed sizeof(char) and useless type casts from void* to another pointer type (patch from Leonid Evdokimov)
Diffstat (limited to 'src/plugins/fifo')
-rw-r--r--src/plugins/fifo/fifo.c7
1 files changed, 3 insertions, 4 deletions
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);