Fix missing initializer warning in document constructor
This commit is contained in:
parent
0414451d79
commit
9db291fe88
1 changed files with 1 additions and 3 deletions
|
|
@ -10,9 +10,7 @@ struct TSDocument {
|
|||
};
|
||||
|
||||
TSDocument *ts_document_make() {
|
||||
TSDocument *document = malloc(sizeof(TSDocument));
|
||||
*document = (TSDocument) {};
|
||||
return document;
|
||||
return calloc(sizeof(TSDocument), 1);
|
||||
}
|
||||
|
||||
void ts_document_free(TSDocument *document) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue