* [PATCH] selinux: clean up indentation issue with assignment statement
@ 2020-03-27 17:44 Colin King
2020-03-27 22:44 ` Paul Moore
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2020-03-27 17:44 UTC (permalink / raw)
To: Paul Moore, Stephen Smalley, Eric Paris, Ondrej Mosnacek, selinux
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The assignment of e->type_names is indented one level too deep,
clean this up by removing the extraneous tab.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
security/selinux/ss/policydb.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c
index 932b2b9bcdb2..70ecdc78efbd 100644
--- a/security/selinux/ss/policydb.c
+++ b/security/selinux/ss/policydb.c
@@ -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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] selinux: clean up indentation issue with assignment statement
2020-03-27 17:44 [PATCH] selinux: clean up indentation issue with assignment statement Colin King
@ 2020-03-27 22:44 ` Paul Moore
0 siblings, 0 replies; 2+ messages in thread
From: Paul Moore @ 2020-03-27 22:44 UTC (permalink / raw)
To: Colin King
Cc: Stephen Smalley, Eric Paris, Ondrej Mosnacek, selinux,
kernel-janitors, linux-kernel
On Fri, Mar 27, 2020 at 1:44 PM Colin King <colin.king@canonical.com> wrote:
>
> From: Colin Ian King <colin.king@canonical.com>
>
> The assignment of e->type_names is indented one level too deep,
> clean this up by removing the extraneous tab.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> 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. :)
> diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c
> index 932b2b9bcdb2..70ecdc78efbd 100644
> --- a/security/selinux/ss/policydb.c
> +++ b/security/selinux/ss/policydb.c
> @@ -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
--
paul moore
www.paul-moore.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-03-27 22:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-27 17:44 [PATCH] selinux: clean up indentation issue with assignment statement Colin King
2020-03-27 22:44 ` Paul Moore
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).