SELinux Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] Trivial style fixes pt2
@ 2019-05-10 22:07 Jokke Hämäläinen
  2019-05-16  0:51 ` William Roberts
  0 siblings, 1 reply; 2+ messages in thread
From: Jokke Hämäläinen @ 2019-05-10 22:07 UTC (permalink / raw)
  To: selinux


---
 libsemanage/src/direct_api.c    | 2 +-
 libsemanage/src/modules.c       | 2 +-
 libsemanage/src/seusers_local.c | 2 +-
 libsemanage/src/users_local.c   | 4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/libsemanage/src/direct_api.c b/libsemanage/src/direct_api.c
index c58961be..7e097d5f 100644
--- a/libsemanage/src/direct_api.c
+++ b/libsemanage/src/direct_api.c
@@ -517,7 +517,7 @@ ssize_t bunzip(semanage_handle_t *sh, FILE *f, char **data)
 	size_t  size = 1<<18;
 	size_t  bufsize = size;
 	int     bzerror;
-	size_t  total=0;
+	size_t  total = 0;
 	char*   uncompress = NULL;
 	char*   tmpalloc = NULL;
 	int     ret = -1;
diff --git a/libsemanage/src/modules.c b/libsemanage/src/modules.c
index 62af1018..fa84d33e 100644
--- a/libsemanage/src/modules.c
+++ b/libsemanage/src/modules.c
@@ -1130,7 +1130,7 @@ int semanage_module_install_info(semanage_handle_t *sh,
 int semanage_module_remove_key(semanage_handle_t *sh,
 			       const semanage_module_key_t *modkey)
 {
-	if (sh->funcs->remove_key== NULL) {
+	if (sh->funcs->remove_key == NULL) {
 		ERR(sh,
 		    "No remove key function defined for this connection type.");
 		return -1;
diff --git a/libsemanage/src/seusers_local.c b/libsemanage/src/seusers_local.c
index a79e2d3d..3e2761c4 100644
--- a/libsemanage/src/seusers_local.c
+++ b/libsemanage/src/seusers_local.c
@@ -133,7 +133,7 @@ int semanage_seuser_modify_local(semanage_handle_t * handle,
 	semanage_seuser_t *new = NULL;
 
 	if (!sename) {
-		errno=EINVAL;
+		errno = EINVAL;
 		return -1;
 	}
 	rc = semanage_seuser_clone(handle, data, &new);
diff --git a/libsemanage/src/users_local.c b/libsemanage/src/users_local.c
index 7aa43d44..8193476d 100644
--- a/libsemanage/src/users_local.c
+++ b/libsemanage/src/users_local.c
@@ -38,7 +38,7 @@ static int lookup_seuser(semanage_handle_t * handle, const semanage_user_key_t *
 	semanage_seuser_list_local(handle,
 				   &records,
 				   &count);
-	for(i=0; i<count; i++) {
+	for(i = 0; i < count; i++) {
 		sename = semanage_seuser_get_sename(records[i]);
 		if (strcmp(name, sename) == 0) {
 			errno = EINVAL;
@@ -47,7 +47,7 @@ static int lookup_seuser(semanage_handle_t * handle, const semanage_user_key_t *
 			rc = -1;
 		}
 	}
-	for(i=0; i<count; i++)
+	for(i = 0; i < count; i++)
 		semanage_seuser_free(records[i]);
 	free(records);
 	semanage_user_free(user);
-- 
2.21.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Trivial style fixes pt2
  2019-05-10 22:07 [PATCH] Trivial style fixes pt2 Jokke Hämäläinen
@ 2019-05-16  0:51 ` William Roberts
  0 siblings, 0 replies; 2+ messages in thread
From: William Roberts @ 2019-05-16  0:51 UTC (permalink / raw)
  To: Jokke Hämäläinen; +Cc: selinux

On Fri, May 10, 2019 at 3:08 PM Jokke Hämäläinen
<jokke.hamalainen@kolttonen.fi> wrote:
>
>
> ---
>  libsemanage/src/direct_api.c    | 2 +-
>  libsemanage/src/modules.c       | 2 +-
>  libsemanage/src/seusers_local.c | 2 +-
>  libsemanage/src/users_local.c   | 4 ++--
>  4 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/libsemanage/src/direct_api.c b/libsemanage/src/direct_api.c
> index c58961be..7e097d5f 100644
> --- a/libsemanage/src/direct_api.c
> +++ b/libsemanage/src/direct_api.c
> @@ -517,7 +517,7 @@ ssize_t bunzip(semanage_handle_t *sh, FILE *f, char **data)
>         size_t  size = 1<<18;
>         size_t  bufsize = size;
>         int     bzerror;
> -       size_t  total=0;
> +       size_t  total = 0;
>         char*   uncompress = NULL;
>         char*   tmpalloc = NULL;
>         int     ret = -1;
> diff --git a/libsemanage/src/modules.c b/libsemanage/src/modules.c
> index 62af1018..fa84d33e 100644
> --- a/libsemanage/src/modules.c
> +++ b/libsemanage/src/modules.c
> @@ -1130,7 +1130,7 @@ int semanage_module_install_info(semanage_handle_t *sh,
>  int semanage_module_remove_key(semanage_handle_t *sh,
>                                const semanage_module_key_t *modkey)
>  {
> -       if (sh->funcs->remove_key== NULL) {
> +       if (sh->funcs->remove_key == NULL) {
>                 ERR(sh,
>                     "No remove key function defined for this connection type.");
>                 return -1;
> diff --git a/libsemanage/src/seusers_local.c b/libsemanage/src/seusers_local.c
> index a79e2d3d..3e2761c4 100644
> --- a/libsemanage/src/seusers_local.c
> +++ b/libsemanage/src/seusers_local.c
> @@ -133,7 +133,7 @@ int semanage_seuser_modify_local(semanage_handle_t * handle,
>         semanage_seuser_t *new = NULL;
>
>         if (!sename) {
> -               errno=EINVAL;
> +               errno = EINVAL;
>                 return -1;
>         }
>         rc = semanage_seuser_clone(handle, data, &new);
> diff --git a/libsemanage/src/users_local.c b/libsemanage/src/users_local.c
> index 7aa43d44..8193476d 100644
> --- a/libsemanage/src/users_local.c
> +++ b/libsemanage/src/users_local.c
> @@ -38,7 +38,7 @@ static int lookup_seuser(semanage_handle_t * handle, const semanage_user_key_t *
>         semanage_seuser_list_local(handle,
>                                    &records,
>                                    &count);
> -       for(i=0; i<count; i++) {
> +       for(i = 0; i < count; i++) {
>                 sename = semanage_seuser_get_sename(records[i]);
>                 if (strcmp(name, sename) == 0) {
>                         errno = EINVAL;
> @@ -47,7 +47,7 @@ static int lookup_seuser(semanage_handle_t * handle, const semanage_user_key_t *
>                         rc = -1;
>                 }
>         }
> -       for(i=0; i<count; i++)
> +       for(i = 0; i < count; i++)
>                 semanage_seuser_free(records[i]);
>         free(records);
>         semanage_user_free(user);
> --
> 2.21.0
>

ack, can you want to stage a PR?

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-10 22:07 [PATCH] Trivial style fixes pt2 Jokke Hämäläinen
2019-05-16  0:51 ` William Roberts

SELinux Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/selinux/0 selinux/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 selinux selinux/ https://lore.kernel.org/selinux \
		selinux@vger.kernel.org selinux@archiver.kernel.org
	public-inbox-index selinux


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.selinux


AGPL code for this site: git clone https://public-inbox.org/ public-inbox