int __cil_resolve_ast_first_child_helper(struct cil_tree_node *current, void *extra_args)
{
	int rc = SEPOL_ERR;
	struct cil_args_resolve *args = extra_args;
	struct cil_tree_node *parent = NULL;

	if (current == NULL || extra_args == NULL) {
		goto exit;
	}

	parent = current->parent;

	if (parent->flavor == CIL_BLOCK) {
		args->block = parent;
	} else if (parent->flavor == CIL_MACRO) {
		args->macro = parent;
	} else if (parent->flavor == CIL_OPTIONAL) {
		args->optional = parent;
	} else if (parent->flavor == CIL_BOOLEANIF) {
		args->boolif = parent;
	}

	return SEPOL_OK;

exit:
	return rc;

}
int __cil_resolve_ast_first_child_helper(struct cil_tree_node *current, void *extra_args)
{
	int rc = SEPOL_ERR;
	struct cil_args_resolve *args = extra_args;
	struct cil_tree_node *parent = NULL;

	if (current == NULL || extra_args == NULL) {
		goto exit;
	}

	parent = current->parent;

	if (parent->flavor == CIL_BLOCK) {
		args->block = parent;
	} else if (parent->flavor == CIL_MACRO) {
		args->macro = parent;
	} else if (parent->flavor == CIL_OPTIONAL) {
		args->optional = parent;
	} else if (parent->flavor == CIL_BOOLEANIF) {
		args->boolif = parent;
	}

	return SEPOL_OK;

exit:
	return rc;

}