* [PATCH] trivial: remove unneeded int
@ 2019-05-24 20:07 Jokke Hämäläinen
2019-06-07 14:04 ` Petr Lautrbach
0 siblings, 1 reply; 6+ messages in thread
From: Jokke Hämäläinen @ 2019-05-24 20:07 UTC (permalink / raw)
To: selinux
diff --git a/libsepol/src/context.c b/libsepol/src/context.c
index a88937fc..e81b28c6 100644
--- a/libsepol/src/context.c
+++ b/libsepol/src/context.c
@@ -38,7 +38,6 @@ int context_is_valid(const policydb_t * p, const context_struct_t * c)
role_datum_t *role;
user_datum_t *usrdatum;
ebitmap_t types, roles;
- int ret = 1;
ebitmap_init(&types);
ebitmap_init(&roles);
@@ -75,7 +74,7 @@ int context_is_valid(const policydb_t * p, const context_struct_t * c)
if (!mls_context_isvalid(p, c))
return 0;
- return ret;
+ return 1;
}
/*
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] trivial: remove unneeded int
2019-05-24 20:07 [PATCH] trivial: remove unneeded int Jokke Hämäläinen
@ 2019-06-07 14:04 ` Petr Lautrbach
2019-06-07 14:46 ` Petr Lautrbach
0 siblings, 1 reply; 6+ messages in thread
From: Petr Lautrbach @ 2019-06-07 14:04 UTC (permalink / raw)
To: Jokke Hämäläinen; +Cc: selinux
Jokke Hämäläinen <jokke.hamalainen@kolttonen.fi> writes:
> diff --git a/libsepol/src/context.c b/libsepol/src/context.c
> index a88937fc..e81b28c6 100644
> --- a/libsepol/src/context.c
> +++ b/libsepol/src/context.c
> @@ -38,7 +38,6 @@ int context_is_valid(const policydb_t * p, const context_struct_t * c)
> role_datum_t *role;
> user_datum_t *usrdatum;
> ebitmap_t types, roles;
> - int ret = 1;
>
> ebitmap_init(&types);
> ebitmap_init(&roles);
> @@ -75,7 +74,7 @@ int context_is_valid(const policydb_t * p, const context_struct_t * c)
> if (!mls_context_isvalid(p, c))
> return 0;
>
> - return ret;
> + return 1;
> }
>
> /*
ack
Would you please add Signed-off line (git commit -s ...) to the description, see
`git log` and https://developercertificate.org/
Also, if the patch applies only to one subdirectory it's a common practice
to use prefix in the subject of the patch, e.g.:
libsepol: trivial: remove unneeded int
Petr
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] trivial: remove unneeded int
2019-06-07 14:04 ` Petr Lautrbach
@ 2019-06-07 14:46 ` Petr Lautrbach
2019-06-12 14:32 ` Jokke Hämäläinen
0 siblings, 1 reply; 6+ messages in thread
From: Petr Lautrbach @ 2019-06-07 14:46 UTC (permalink / raw)
To: Jokke Hämäläinen; +Cc: selinux
Petr Lautrbach <plautrba@redhat.com> writes:
> Jokke Hämäläinen <jokke.hamalainen@kolttonen.fi> writes:
>
>> diff --git a/libsepol/src/context.c b/libsepol/src/context.c
>> index a88937fc..e81b28c6 100644
>> --- a/libsepol/src/context.c
>> +++ b/libsepol/src/context.c
>> @@ -38,7 +38,6 @@ int context_is_valid(const policydb_t * p, const context_struct_t * c)
>> role_datum_t *role;
>> user_datum_t *usrdatum;
>> ebitmap_t types, roles;
>> - int ret = 1;
>>
>> ebitmap_init(&types);
>> ebitmap_init(&roles);
>> @@ -75,7 +74,7 @@ int context_is_valid(const policydb_t * p, const context_struct_t * c)
>> if (!mls_context_isvalid(p, c))
>> return 0;
>>
>> - return ret;
>> + return 1;
>> }
>>
>> /*
>
> ack
>
> Would you please add Signed-off line (git commit -s ...) to the description, see
> `git log` and https://developercertificate.org/
>
> Also, if the patch applies only to one subdirectory it's a common practice
> to use prefix in the subject of the patch, e.g.:
>
> libsepol: trivial: remove unneeded int
>
The same comment applies also to your other unmerged patches
* trivial: remove unneeded int
* remove redundant if
* More accurate error messages
* trivial fix incorrect indentation
* trivial typo fix
travis CI seems to be happy with all of them
https://travis-ci.org/bachradsusi/SELinuxProject-selinux/builds/542793341
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] trivial: remove unneeded int
2019-06-07 14:46 ` Petr Lautrbach
@ 2019-06-12 14:32 ` Jokke Hämäläinen
2019-06-12 18:39 ` William Roberts
0 siblings, 1 reply; 6+ messages in thread
From: Jokke Hämäläinen @ 2019-06-12 14:32 UTC (permalink / raw)
To: Petr Lautrbach; +Cc: selinux
[-- Attachment #1: Type: text/plain, Size: 405 bytes --]
Hello,
On Fri, 7 Jun 2019, Petr Lautrbach wrote:
> The same comment applies also to your other unmerged patches
>
> * trivial: remove unneeded int
> * remove redundant if
> * More accurate error messages
> * trivial fix incorrect indentation
> * trivial typo fix
The simple patches now have a "Signed-off-by:" line in
the description.
Pull requests have been done.
Best regards,
Jokke Hämäläinen
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] trivial: remove unneeded int
2019-06-12 14:32 ` Jokke Hämäläinen
@ 2019-06-12 18:39 ` William Roberts
2019-06-13 15:57 ` Jokke Hämäläinen
0 siblings, 1 reply; 6+ messages in thread
From: William Roberts @ 2019-06-12 18:39 UTC (permalink / raw)
To: Jokke Hämäläinen; +Cc: Petr Lautrbach, selinux
On Wed, Jun 12, 2019 at 11:01 AM Jokke Hämäläinen
<jokke.hamalainen@kolttonen.fi> wrote:
>
>
> Hello,
>
> On Fri, 7 Jun 2019, Petr Lautrbach wrote:
>
> > The same comment applies also to your other unmerged patches
> >
> > * trivial: remove unneeded int
> > * remove redundant if
> > * More accurate error messages
> > * trivial fix incorrect indentation
> > * trivial typo fix
>
> The simple patches now have a "Signed-off-by:" line in
> the description.
>
> Pull requests have been done.
>
You have all your new patches as individual PR's with merge commits, very weird:
https://github.com/SELinuxProject/selinux/pull/154/commits
Rather then:
1. creating a PR per patch
2. merge workflow
Please:
1. Since all your patches are related in goal within the series, just
put them on 1 PR
2. rebase workflow, ie always git pull --rebase origin/master
I don't know if this is the most efficient way with git, but you
can just cherry-pick all
those commits on a branch that is up-to-date with master.
3. You still need to send them back out to the list
4. commit messages lacking
On top of that, Stephen has mentioned that we don't want to get in the
habit of taking style
fixes. The three actual changes you have are:
> > * trivial: remove unneeded int
> > * remove redundant if
> > * More accurate error messages
Additionally, lets work on those commit messages, typically when
someone starts with <label>: that label isn't
something like trivial, it's used for referencing the component touched.
libsepol: remove unneeded int
the routine context_is_valid() had an int that was used as a return
code that was set and never modified. Just return
the constant instead.
<signed-off...>
I'm OK with those three if you fix the 4 issues I pointed out. I'll
let Stephen decide the fate on the pure style patches.
> Best regards,
> Jokke Hämäläinen
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-06-13 15:58 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-24 20:07 [PATCH] trivial: remove unneeded int Jokke Hämäläinen
2019-06-07 14:04 ` Petr Lautrbach
2019-06-07 14:46 ` Petr Lautrbach
2019-06-12 14:32 ` Jokke Hämäläinen
2019-06-12 18:39 ` William Roberts
2019-06-13 15:57 ` Jokke Hämäläinen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.