aboutsummaryrefslogtreecommitdiffstats
path: root/com32/elflink/ldlinux/cli.c
diff options
context:
space:
mode:
Diffstat (limited to 'com32/elflink/ldlinux/cli.c')
-rw-r--r--com32/elflink/ldlinux/cli.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/com32/elflink/ldlinux/cli.c b/com32/elflink/ldlinux/cli.c
index 77d32cd2..b35e958b 100644
--- a/com32/elflink/ldlinux/cli.c
+++ b/com32/elflink/ldlinux/cli.c
@@ -369,9 +369,8 @@ void process_command(const char *cmd, bool history)
if (history) {
struct cli_command *comm;
- comm = (struct cli_command *)malloc(sizeof(struct cli_command *));
- comm->command =
- (char *)malloc(sizeof(char) * (strlen(cmd) + 1));
+ comm = malloc(sizeof(struct cli_command));
+ comm->command = malloc(sizeof(char) * (strlen(cmd) + 1));
strcpy(comm->command, cmd);
list_add(&(comm->list), &cli_history_head);
}