From bfb2047463e7245ed76fe6f2161b51aa11131f64 Mon Sep 17 00:00:00 2001 From: Roland Illig Date: Mon, 16 Aug 2004 16:22:14 +0000 Subject: [PATCH] Removed unnecessary type cast. --- src/file.c | 2 +- src/subshell.c | 7 +++---- src/util.c | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/file.c b/src/file.c index 94b0423eb..2f7279bfc 100644 --- a/src/file.c +++ b/src/file.c @@ -649,7 +649,7 @@ copy_file_file (FileOpContext *ctx, char *src_path, char *dst_path, continue; goto ret; } - buf = (char *) g_malloc (buf_size); + buf = g_malloc (buf_size); ctx->eta_secs = 0.0; ctx->bps = 0; diff --git a/src/subshell.c b/src/subshell.c index 3e5060a37..7d609c1ac 100644 --- a/src/subshell.c +++ b/src/subshell.c @@ -400,7 +400,7 @@ init_subshell (void) /* Initialise the pty's I/O buffer */ pty_buffer_size = INITIAL_PTY_BUFFER_SIZE; - pty_buffer = (char *) g_malloc (pty_buffer_size); + pty_buffer = g_malloc (pty_buffer_size); /* Create a pipe for receiving the subshell's CWD */ @@ -574,7 +574,7 @@ read_subshell_prompt (void) FD_SET (subshell_pty, &tmp); if (subshell_prompt == NULL) { /* First time through */ - subshell_prompt = (char *) g_malloc (prompt_size); + subshell_prompt = g_malloc (prompt_size); *subshell_prompt = '\0'; prompt_pos = 0; } @@ -607,8 +607,7 @@ read_subshell_prompt (void) subshell_prompt[prompt_pos++] = pty_buffer[i]; if (prompt_pos == prompt_size) subshell_prompt = - (char *) g_realloc (subshell_prompt, prompt_size *= - 2); + g_realloc (subshell_prompt, prompt_size *= 2); } subshell_prompt[prompt_pos] = '\0'; diff --git a/src/util.c b/src/util.c index efd937d41..6d28d6fdf 100644 --- a/src/util.c +++ b/src/util.c @@ -606,7 +606,7 @@ char *load_file (char *filename) fclose (data_file); return 0; } - data = (char *) g_malloc (s.st_size+1); + data = g_malloc (s.st_size+1); read_size = fread (data, 1, s.st_size, data_file); data [read_size] = 0; fclose (data_file);