File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -183,7 +183,7 @@ memory release function and handle a few more error cases:
183
183
184
184
``` diff
185
185
+ Table* new_table() {
186
- + Table* table = malloc(sizeof(Table));
186
+ + Table* table = (Table*) malloc(sizeof(Table));
187
187
+ table->num_rows = 0;
188
188
+ for (uint32_t i = 0; i < TABLE_MAX_PAGES; i++) {
189
189
+ table->pages[i] = NULL;
@@ -342,7 +342,7 @@ We'll address those issues in the next part. For now, here's the complete diff f
342
342
+ }
343
343
+
344
344
+ Table* new_table() {
345
- + Table* table = malloc(sizeof(Table));
345
+ + Table* table = (Table*) malloc(sizeof(Table));
346
346
+ table->num_rows = 0;
347
347
+ for (uint32_t i = 0; i < TABLE_MAX_PAGES; i++) {
348
348
+ table->pages[i] = NULL;
@@ -358,7 +358,7 @@ We'll address those issues in the next part. For now, here's the complete diff f
358
358
+ }
359
359
+
360
360
InputBuffer* new_input_buffer() {
361
- InputBuffer* input_buffer = malloc(sizeof(InputBuffer));
361
+ InputBuffer* input_buffer = (InputBuffer*) malloc(sizeof(InputBuffer));
362
362
input_buffer->buffer = NULL;
363
363
@@ -40,17 +140,105 @@ void close_input_buffer(InputBuffer* input_buffer) {
364
364
free(input_buffer);
You can’t perform that action at this time.
0 commit comments