]> git.droids-corp.org - protos/libecoli.git/blobdiff - libecoli/ecoli_parse.c
add reminders in code
[protos/libecoli.git] / libecoli / ecoli_parse.c
index 6396fc1831da38b00f415b006ccfc3d77f0f0590..3d6be77a41b672c3dcb448f97053d304967ea736 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;
 }