Unify the coding style for `return`.
[smdp.git] / src / parser.c
index 04a0b49..ce3f702 100644 (file)
@@ -181,8 +181,8 @@ deck_t *markdown_load(FILE *input) {
         }
 
         // split linked list
-        line->prev->next = (void*)0;
-        line->prev = (void*)0;
+        line->prev->next = NULL;
+        line->prev = NULL;
 
         // remove header lines from slide
         deck->slide->line = line;
@@ -363,9 +363,6 @@ int markdown_analyse(cstring_t *text) {
                 if(text->text[i] == ' ') {
                     spaces++;
 
-                } else if(CHECK_BIT(bits, IS_CODE)) {
-                    other++;
-
                 } else {
                     switch(text->text[i]) {
                         case '=': equals++;  break;
@@ -481,8 +478,8 @@ void markdown_debug(deck_t *deck, int debug) {
     }
 }
 
-int is_utf8(char ch) {
-    return (ch & 0x80);
+bool is_utf8(char ch) {
+    return (ch & 0x80) != 0x00;
 }
 
 int length_utf8(char ch) {