Commit 10601e77 authored by Pierre-Hugues Husson's avatar Pierre-Hugues Husson

Rename variables in add_transition to be more explicit

parent 088ce9c2
...@@ -173,8 +173,8 @@ int add_rule(char *s, char *t, char *c, char *p, policydb_t *policy) { ...@@ -173,8 +173,8 @@ int add_rule(char *s, char *t, char *c, char *p, policydb_t *policy) {
return 0; return 0;
} }
int add_transition(char *srcS, char *fconS, char *tgtS, char *c, policydb_t *policy) { int add_transition(char *srcS, char *origS, char *tgtS, char *c, policydb_t *policy) {
type_datum_t *src, *tgt, *fcon; type_datum_t *src, *tgt, *orig;
class_datum_t *cls; class_datum_t *cls;
avtab_datum_t *av; avtab_datum_t *av;
...@@ -195,14 +195,14 @@ int add_transition(char *srcS, char *fconS, char *tgtS, char *c, policydb_t *pol ...@@ -195,14 +195,14 @@ int add_transition(char *srcS, char *fconS, char *tgtS, char *c, policydb_t *pol
fprintf(stderr, "class %s does not exist\n", c); fprintf(stderr, "class %s does not exist\n", c);
return 1; return 1;
} }
fcon = hashtab_search(policy->p_types.table, fconS); orig = hashtab_search(policy->p_types.table, origS);
if (cls == NULL) { if (cls == NULL) {
fprintf(stderr, "class %s does not exist\n", fconS); fprintf(stderr, "class %s does not exist\n", origS);
return 1; return 1;
} }
key.source_type = src->s.value; key.source_type = src->s.value;
key.target_type = fcon->s.value; key.target_type = orig->s.value;
key.target_class = cls->s.value; key.target_class = cls->s.value;
key.specified = AVTAB_TRANSITION; key.specified = AVTAB_TRANSITION;
av = avtab_search(&policy->te_avtab, &key); av = avtab_search(&policy->te_avtab, &key);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment