Lines Matching defs:cp
580 int cil_fill_classperms(struct cil_tree_node *parse_current, struct cil_classperms **cp)
595 cil_classperms_init(cp);
597 (*cp)->class_str = parse_current->data;
599 rc = cil_fill_perms(parse_current->next, &(*cp)->perm_strs);
601 cil_destroy_classperms(*cp);
609 *cp = NULL;
613 void cil_destroy_classperms(struct cil_classperms *cp)
615 if (cp == NULL) {
619 cil_list_destroy(&cp->perm_strs, CIL_TRUE);
620 cil_list_destroy(&cp->perms, CIL_FALSE);
622 free(cp);
712 struct cil_classpermission *cp = NULL;
729 cil_classpermission_init(&cp);
733 rc = cil_gen_node(db, ast_node, (struct cil_symtab_datum*)cp, (hashtab_key_t)key, CIL_SYM_CLASSPERMSETS, CIL_CLASSPERMISSION);
743 cil_destroy_classpermission(cp);
748 void cil_destroy_classpermission(struct cil_classpermission *cp)
750 if (cp == NULL) {
754 if (cp->datum.name != NULL) {
755 cil_list_destroy(&cp->classperms, CIL_FALSE);
758 cil_destroy_classperms_list(&cp->classperms);
761 cil_symtab_datum_destroy(&cp->datum);
764 free(cp);