Skip to content

Commit

Permalink
Merge pull request #41 from stardustman/master
Browse files Browse the repository at this point in the history
fix malloc() return value  cast to pointer of InputBuffer
  • Loading branch information
cstack authored Jul 15, 2019
2 parents 2248a7f + bf7c202 commit 3fd188f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _parts/part1.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ typedef struct {
} InputBuffer;
InputBuffer* new_input_buffer() {
InputBuffer* input_buffer = malloc(sizeof(InputBuffer));
InputBuffer* input_buffer = (InputBuffer*)malloc(sizeof(InputBuffer));
input_buffer->buffer = NULL;
input_buffer->buffer_length = 0;
input_buffer->input_length = 0;
Expand Down

0 comments on commit 3fd188f

Please sign in to comment.