diff mbox series

[1/5] libsepol: rename validate_policydb to policydb_validate

Message ID 20220713141148.35524-1-cgzones@googlemail.com (mailing list archive)
State Accepted
Commit 938530171bcf
Headers show
Series [1/5] libsepol: rename validate_policydb to policydb_validate | expand

Commit Message

Christian Göttsche July 13, 2022, 2:11 p.m. UTC
Most global functions operating on a policy database use policydb as
prefix.

Since this function is not exported there should not be any external
use.

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
---
 libsepol/src/policydb.c          | 2 +-
 libsepol/src/policydb_validate.c | 2 +-
 libsepol/src/policydb_validate.h | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

Comments

James Carter July 20, 2022, 3:35 p.m. UTC | #1
On Wed, Jul 13, 2022 at 10:12 AM Christian Göttsche
<cgzones@googlemail.com> wrote:
>
> Most global functions operating on a policy database use policydb as
> prefix.
>
> Since this function is not exported there should not be any external
> use.
>
> Signed-off-by: Christian Göttsche <cgzones@googlemail.com>

For this series:
Acked-by: James Carter <jwcart2@gmail.com>

> ---
>  libsepol/src/policydb.c          | 2 +-
>  libsepol/src/policydb_validate.c | 2 +-
>  libsepol/src/policydb_validate.h | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/libsepol/src/policydb.c b/libsepol/src/policydb.c
> index fc260eb6..8a65df05 100644
> --- a/libsepol/src/policydb.c
> +++ b/libsepol/src/policydb.c
> @@ -4570,7 +4570,7 @@ int policydb_read(policydb_t * p, struct policy_file *fp, unsigned verbose)
>                 }
>         }
>
> -       if (validate_policydb(fp->handle, p))
> +       if (policydb_validate(fp->handle, p))
>                 goto bad;
>
>         return POLICYDB_SUCCESS;
> diff --git a/libsepol/src/policydb_validate.c b/libsepol/src/policydb_validate.c
> index 99d4eb7f..e1dad236 100644
> --- a/libsepol/src/policydb_validate.c
> +++ b/libsepol/src/policydb_validate.c
> @@ -1330,7 +1330,7 @@ static void validate_array_destroy(validate_t flavors[])
>  /*
>   * Validate policydb
>   */
> -int validate_policydb(sepol_handle_t *handle, policydb_t *p)
> +int policydb_validate(sepol_handle_t *handle, policydb_t *p)
>  {
>         validate_t flavors[SYM_NUM] = {};
>
> diff --git a/libsepol/src/policydb_validate.h b/libsepol/src/policydb_validate.h
> index d9f7229b..b7f9f191 100644
> --- a/libsepol/src/policydb_validate.h
> +++ b/libsepol/src/policydb_validate.h
> @@ -4,4 +4,4 @@
>  #include <sepol/policydb/policydb.h>
>
>  int value_isvalid(uint32_t value, uint32_t nprim);
> -int validate_policydb(sepol_handle_t *handle, policydb_t *p);
> +int policydb_validate(sepol_handle_t *handle, policydb_t *p);
> --
> 2.36.1
>
diff mbox series

Patch

diff --git a/libsepol/src/policydb.c b/libsepol/src/policydb.c
index fc260eb6..8a65df05 100644
--- a/libsepol/src/policydb.c
+++ b/libsepol/src/policydb.c
@@ -4570,7 +4570,7 @@  int policydb_read(policydb_t * p, struct policy_file *fp, unsigned verbose)
 		}
 	}
 
-	if (validate_policydb(fp->handle, p))
+	if (policydb_validate(fp->handle, p))
 		goto bad;
 
 	return POLICYDB_SUCCESS;
diff --git a/libsepol/src/policydb_validate.c b/libsepol/src/policydb_validate.c
index 99d4eb7f..e1dad236 100644
--- a/libsepol/src/policydb_validate.c
+++ b/libsepol/src/policydb_validate.c
@@ -1330,7 +1330,7 @@  static void validate_array_destroy(validate_t flavors[])
 /*
  * Validate policydb
  */
-int validate_policydb(sepol_handle_t *handle, policydb_t *p)
+int policydb_validate(sepol_handle_t *handle, policydb_t *p)
 {
 	validate_t flavors[SYM_NUM] = {};
 
diff --git a/libsepol/src/policydb_validate.h b/libsepol/src/policydb_validate.h
index d9f7229b..b7f9f191 100644
--- a/libsepol/src/policydb_validate.h
+++ b/libsepol/src/policydb_validate.h
@@ -4,4 +4,4 @@ 
 #include <sepol/policydb/policydb.h>
 
 int value_isvalid(uint32_t value, uint32_t nprim);
-int validate_policydb(sepol_handle_t *handle, policydb_t *p);
+int policydb_validate(sepol_handle_t *handle, policydb_t *p);