X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=src%2Fmarkdown.c;h=d5dbe197958944fb4f5ae70f031fcb9e2ae1930e;hb=2669a43752c6d8386826a1d96fa64c42d9cc77b9;hp=2648dc11bb4120a574f7dad606cfc04af6874399;hpb=b1e0c986d6e531f71d0a3ecc01551ab2d9cd8929;p=smdp.git diff --git a/src/markdown.c b/src/markdown.c index 2648dc1..d5dbe19 100644 --- a/src/markdown.c +++ b/src/markdown.c @@ -26,8 +26,8 @@ line_t *new_line() { line_t *x = malloc(sizeof(line_t)); - x->text = (void*)0; - x->prev = x->next = (void*)0; + x->text = NULL; + x->prev = x->next = NULL; x->bits = x->length = x->offset = 0; return x; } @@ -41,8 +41,8 @@ line_t *next_line(line_t *prev) { slide_t *new_slide() { slide_t *x = malloc(sizeof(slide_t)); - x->line = (void*)0; - x->prev = x->next = (void*)0; + x->line = NULL; + x->prev = x->next = NULL; x->lines = 0; return x; } @@ -56,8 +56,8 @@ slide_t *next_slide(slide_t *prev) { deck_t *new_deck() { deck_t *x = malloc(sizeof(deck_t)); - x->header = (void*)0; - x->slide = (void*)0; + x->header = NULL; + x->slide = new_slide(); x->slides = x->headers = 0; return x; }