diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2023-05-15 17:39:36 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2023-05-15 17:39:36 +0200 |
| commit | 0e06db65fe8d44e349eee322d031c4b63e9603c8 (patch) | |
| tree | 754ba5fcbe90158f762f7991d72c286aa30b4cc8 | |
| parent | 305581d247fc27892095b55d010b5d779d338ba5 (diff) | |
| download | sdep-0e06db65fe8d44e349eee322d031c4b63e9603c8.tar.gz sdep-0e06db65fe8d44e349eee322d031c4b63e9603c8.zip | |
Removed unnecessary sizeof(char)
Diffstat (limited to '')
| -rw-r--r-- | sdep.c | 8 |
1 files changed, 4 insertions, 4 deletions
| @@ -66,7 +66,7 @@ add_event(struct tm t, char *text, EventList *evlist) | |||
| 66 | EventNode *next = malloc(sizeof(EventNode)); | 66 | EventNode *next = malloc(sizeof(EventNode)); |
| 67 | 67 | ||
| 68 | next->ev.time = t; | 68 | next->ev.time = t; |
| 69 | next->ev.text = malloc(sizeof(char) * l); | 69 | next->ev.text = malloc(l); |
| 70 | strncpy(next->ev.text, text, l); | 70 | strncpy(next->ev.text, text, l); |
| 71 | next->ev.text = strtrim(next->ev.text); | 71 | next->ev.text = strtrim(next->ev.text); |
| 72 | next->next = NULL; | 72 | next->next = NULL; |
| @@ -107,9 +107,9 @@ default_op(void) | |||
| 107 | time_t t_now = time(NULL); | 107 | time_t t_now = time(NULL); |
| 108 | struct tm *now = localtime(&t_now); | 108 | struct tm *now = localtime(&t_now); |
| 109 | 109 | ||
| 110 | op.format_in = malloc(sizeof(char) * MAXLEN); | 110 | op.format_in = malloc(MAXLEN); |
| 111 | op.format_out = malloc(sizeof(char) * MAXLEN); | 111 | op.format_out = malloc(MAXLEN); |
| 112 | op.separator = malloc(sizeof(char) * MAXLEN); | 112 | op.separator = malloc(MAXLEN); |
| 113 | strcpy(op.format_in, default_format); | 113 | strcpy(op.format_in, default_format); |
| 114 | strcpy(op.format_out, default_format); | 114 | strcpy(op.format_out, default_format); |
| 115 | strcpy(op.separator, "\t"); | 115 | strcpy(op.separator, "\t"); |
