Skip to content

Commit bf7c202

Browse files
committed
fix malloc() return value cast to pointer of InputBuffer
1 parent 2248a7f commit bf7c202

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

_parts/part1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ typedef struct {
9090
} InputBuffer;
9191
9292
InputBuffer* new_input_buffer() {
93-
InputBuffer* input_buffer = malloc(sizeof(InputBuffer));
93+
InputBuffer* input_buffer = (InputBuffer*)malloc(sizeof(InputBuffer));
9494
input_buffer->buffer = NULL;
9595
input_buffer->buffer_length = 0;
9696
input_buffer->input_length = 0;

0 commit comments

Comments
 (0)