From 0e06db65fe8d44e349eee322d031c4b63e9603c8 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Mon, 15 May 2023 17:39:36 +0200 Subject: Removed unnecessary sizeof(char) --- sdep.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sdep.c b/sdep.c index ae17769..389f17d 100644 --- a/sdep.c +++ b/sdep.c @@ -66,7 +66,7 @@ add_event(struct tm t, char *text, EventList *evlist) EventNode *next = malloc(sizeof(EventNode)); next->ev.time = t; - next->ev.text = malloc(sizeof(char) * l); + next->ev.text = malloc(l); strncpy(next->ev.text, text, l); next->ev.text = strtrim(next->ev.text); next->next = NULL; @@ -107,9 +107,9 @@ default_op(void) time_t t_now = time(NULL); struct tm *now = localtime(&t_now); - op.format_in = malloc(sizeof(char) * MAXLEN); - op.format_out = malloc(sizeof(char) * MAXLEN); - op.separator = malloc(sizeof(char) * MAXLEN); + op.format_in = malloc(MAXLEN); + op.format_out = malloc(MAXLEN); + op.separator = malloc(MAXLEN); strcpy(op.format_in, default_format); strcpy(op.format_out, default_format); strcpy(op.separator, "\t"); -- cgit v1.3