Skip to content

Commit c3d5432

Browse files
committed
Update later parts to match earlier changes
1 parent 84d1ede commit c3d5432

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

_parts/part5.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ I'm renaming `new_table()` to `db_open()` because it now has the effect of openi
6666
+ Pager* pager = pager_open(filename);
6767
+ uint32_t num_rows = pager->file_length / ROW_SIZE;
6868
+
69-
Table* table = malloc(sizeof(Table));
69+
Table* table = calloc(sizeof(Table));
7070
- table->num_rows = 0;
7171
+ table->pager = pager;
7272
+ table->num_rows = num_rows;
@@ -413,7 +413,7 @@ Until then!
413413
+ Pager* pager = pager_open(filename);
414414
+ uint32_t num_rows = pager->file_length / ROW_SIZE;
415415
+
416-
Table* table = malloc(sizeof(Table));
416+
Table* table = calloc(sizeof(Table));
417417
- table->num_rows = 0;
418418
+ table->pager = pager;
419419
+ table->num_rows = num_rows;

0 commit comments

Comments
 (0)