Skip to contentSkip to conversation

selinux: clean up indentation issue with assignment statement

PATCH In review Colin King 2 participants 2 messages Mar 27, 2020

Subsystems (2)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 selinux: clean up indentation issue with assignment statement

From: Colin Ian King <[email protected]>

The assignment of e->type_names is indented one level too deep, clean this up by removing the extraneous tab.

---
 security/selinux/ss/policydb.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
security/selinux/ss/policydb.c +3 -3
index 932b2b9bcdb2..70ecdc78efbd 100644
@@ -1219,10 +1219,9 @@ static int read_cons_helper(struct policydb *p,
 				if (rc)
 					return rc;
 				if (p->policyvers >-					POLICYDB_VERSION_CONSTRAINT_NAMES) {
-						e->type_names = kzalloc(sizeof
-						(*e->type_names),
-						GFP_KERNEL);
+				    POLICYDB_VERSION_CONSTRAINT_NAMES) {
+					e->type_names = kzalloc(sizeof
+						(*e->type_names), GFP_KERNEL);
 					if (!e->type_names)
 						return -ENOMEM;
 					type_set_init(e->type_names);
Signature · 1 line
2.25.1
maintainer
#1 lore raw
Quoted 10 lines · Colin King

From: Colin Ian King <[email protected]>

The assignment of e->type_names is indented one level too deep, clean this up by removing the extraneous tab.

---
 security/selinux/ss/policydb.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

I generally dislike style/formatting only changes, but one could argue that this is just plain wrong regardless of how you like your code to look.

I also dislike merging changes into selinux/next when we are at -rc7, but this is trivial and obviously correct.

However, despite not wanting to merge this into selinux/next I decided to do just that - thanks for the fix. :)

Quoted 19 lines
security/selinux/ss/policydb.c +3 -4
index 932b2b9bcdb2..70ecdc78efbd 100644
@@ -1219,10 +1219,9 @@ static int read_cons_helper(struct policydb *p,
                                if (rc)
                                        return rc;
                                if (p->policyvers >> -                                       POLICYDB_VERSION_CONSTRAINT_NAMES) {
-                                               e->type_names = kzalloc(sizeof
-                                               (*e->type_names),
-                                               GFP_KERNEL);
+                                   POLICYDB_VERSION_CONSTRAINT_NAMES) {
+                                       e->type_names = kzalloc(sizeof
+                                               (*e->type_names), GFP_KERNEL);
                                        if (!e->type_names)
                                                return -ENOMEM;
                                        type_set_init(e->type_names);
--

2.25.1

Signature · 2 lines
paul moore
www.paul-moore.com