X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=src%2Fmarkdown.c;h=d5dbe197958944fb4f5ae70f031fcb9e2ae1930e;hb=651b0eba4cdf0afc46f8646f57a9fff4d2d68c5e;hp=6e7d15f1c29168d52f823f1d3f4335f079f04f34;hpb=6f9f33a6a5c7d677b4f4464218c01580a391cf08;p=smdp.git diff --git a/src/markdown.c b/src/markdown.c index 6e7d15f..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,9 +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; } -