add reminders in code
[protos/libecoli.git] / libecoli / ecoli_parse.c
index 6396fc1..3d6be77 100644 (file)
@@ -91,6 +91,7 @@ int ec_node_parse_child(const struct ec_node *node, struct ec_parse *state,
        return __ec_node_parse_child(node, state, false, strvec);
 }
 
+// XXX what is returned if no match ??
 struct ec_parse *ec_node_parse_strvec(const struct ec_node *node,
                                const struct ec_strvec *strvec)
 {
@@ -328,6 +329,9 @@ bool ec_parse_has_child(const struct ec_parse *parse)
 
 const struct ec_node *ec_parse_get_node(const struct ec_parse *parse)
 {
+       if (parse == NULL)
+               return NULL;
+
        return parse->node;
 }