Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2ced3dfd authored by Eric Paris's avatar Eric Paris Committed by James Morris
Browse files

changing whitespace for fun and profit: policydb.c



More formatting changes.  Aside from the 80 character line limit even
the checkpatch scripts like this file now.  Too bad I don't get paid by
the lines of code I change.

Signed-off-by: default avatarEric Paris <eparis@redhat.com>
Signed-off-by: default avatarJames Morris <jmorris@namei.org>
parent 828dfe1d
Loading
Loading
Loading
Loading
+63 −68
Original line number Original line Diff line number Diff line
@@ -51,7 +51,7 @@ static char *symtab_name[SYM_NUM] = {
};
};
#endif
#endif


int selinux_mls_enabled = 0;
int selinux_mls_enabled;


static unsigned int symtab_sizes[SYM_NUM] = {
static unsigned int symtab_sizes[SYM_NUM] = {
	2,
	2,
@@ -1012,11 +1012,10 @@ static int read_cons_helper(struct constraint_node **nodep, int ncons,
		if (!c)
		if (!c)
			return -ENOMEM;
			return -ENOMEM;


		if (lc) {
		if (lc)
			lc->next = c;
			lc->next = c;
		} else {
		else
			*nodep = c;
			*nodep = c;
		}


		rc = next_entry(buf, fp, (sizeof(u32) * 2));
		rc = next_entry(buf, fp, (sizeof(u32) * 2));
		if (rc < 0)
		if (rc < 0)
@@ -1030,11 +1029,10 @@ static int read_cons_helper(struct constraint_node **nodep, int ncons,
			if (!e)
			if (!e)
				return -ENOMEM;
				return -ENOMEM;


			if (le) {
			if (le)
				le->next = e;
				le->next = e;
			} else {
			else
				c->expr = e;
				c->expr = e;
			}


			rc = next_entry(buf, fp, (sizeof(u32) * 3));
			rc = next_entry(buf, fp, (sizeof(u32) * 3));
			if (rc < 0)
			if (rc < 0)
@@ -1634,11 +1632,10 @@ int policydb_read(struct policydb *p, void *fp)
			rc = -ENOMEM;
			rc = -ENOMEM;
			goto bad;
			goto bad;
		}
		}
		if (ltr) {
		if (ltr)
			ltr->next = tr;
			ltr->next = tr;
		} else {
		else
			p->role_tr = tr;
			p->role_tr = tr;
		}
		rc = next_entry(buf, fp, sizeof(u32)*3);
		rc = next_entry(buf, fp, sizeof(u32)*3);
		if (rc < 0)
		if (rc < 0)
			goto bad;
			goto bad;
@@ -1665,11 +1662,10 @@ int policydb_read(struct policydb *p, void *fp)
			rc = -ENOMEM;
			rc = -ENOMEM;
			goto bad;
			goto bad;
		}
		}
		if (lra) {
		if (lra)
			lra->next = ra;
			lra->next = ra;
		} else {
		else
			p->role_allow = ra;
			p->role_allow = ra;
		}
		rc = next_entry(buf, fp, sizeof(u32)*2);
		rc = next_entry(buf, fp, sizeof(u32)*2);
		if (rc < 0)
		if (rc < 0)
			goto bad;
			goto bad;
@@ -1703,11 +1699,10 @@ int policydb_read(struct policydb *p, void *fp)
				rc = -ENOMEM;
				rc = -ENOMEM;
				goto bad;
				goto bad;
			}
			}
			if (l) {
			if (l)
				l->next = c;
				l->next = c;
			} else {
			else
				p->ocontexts[i] = c;
				p->ocontexts[i] = c;
			}
			l = c;
			l = c;
			rc = -EINVAL;
			rc = -EINVAL;
			switch (i) {
			switch (i) {