Patchwork [07/11] lib: fwts_checkeuid: constify function arguments where appropriate

login
register
mail settings
Submitter Colin King
Date Oct. 16, 2012, 7:20 p.m.
Message ID <1350415248-16965-8-git-send-email-colin.king@canonical.com>
Download mbox | patch
Permalink /patch/191861/
State Accepted
Headers show

Comments

Colin King - Oct. 16, 2012, 7:20 p.m.
From: Colin Ian King <colin.king@canonical.com>

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/lib/include/fwts_checkeuid.h |    2 +-
 src/lib/src/fwts_checkeuid.c     |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Keng-Yu Lin - Oct. 18, 2012, 6:49 a.m.
On Wed, Oct 17, 2012 at 3:20 AM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/lib/include/fwts_checkeuid.h |    2 +-
>  src/lib/src/fwts_checkeuid.c     |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/lib/include/fwts_checkeuid.h b/src/lib/include/fwts_checkeuid.h
> index fb2ce29..3669e39 100644
> --- a/src/lib/include/fwts_checkeuid.h
> +++ b/src/lib/include/fwts_checkeuid.h
> @@ -22,6 +22,6 @@
>
>  #include "fwts_framework.h"
>
> -int fwts_check_root_euid(fwts_framework *fw, bool warn);
> +int fwts_check_root_euid(fwts_framework *fw, const bool warn);
>
>  #endif
> diff --git a/src/lib/src/fwts_checkeuid.c b/src/lib/src/fwts_checkeuid.c
> index da4c32c..756ed81 100644
> --- a/src/lib/src/fwts_checkeuid.c
> +++ b/src/lib/src/fwts_checkeuid.c
> @@ -28,7 +28,7 @@
>   *  fwts_check_root_euid()
>   *     Check if user has privileges to access ports, memory, etc
>   */
> -int fwts_check_root_euid(fwts_framework *fw, bool warn)
> +int fwts_check_root_euid(fwts_framework *fw, const bool warn)
>  {
>         if (geteuid() != 0) {
>                 if (warn)
> --
> 1.7.10.4
>
Acked-by: Keng-Yu Lin <kengyu@canonical.com>
Ivan Hu - Oct. 22, 2012, 9:33 a.m.
On 10/17/2012 03:20 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/lib/include/fwts_checkeuid.h |    2 +-
>   src/lib/src/fwts_checkeuid.c     |    2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/lib/include/fwts_checkeuid.h b/src/lib/include/fwts_checkeuid.h
> index fb2ce29..3669e39 100644
> --- a/src/lib/include/fwts_checkeuid.h
> +++ b/src/lib/include/fwts_checkeuid.h
> @@ -22,6 +22,6 @@
>
>   #include "fwts_framework.h"
>
> -int fwts_check_root_euid(fwts_framework *fw, bool warn);
> +int fwts_check_root_euid(fwts_framework *fw, const bool warn);
>
>   #endif
> diff --git a/src/lib/src/fwts_checkeuid.c b/src/lib/src/fwts_checkeuid.c
> index da4c32c..756ed81 100644
> --- a/src/lib/src/fwts_checkeuid.c
> +++ b/src/lib/src/fwts_checkeuid.c
> @@ -28,7 +28,7 @@
>    *  fwts_check_root_euid()
>    *	Check if user has privileges to access ports, memory, etc
>    */
> -int fwts_check_root_euid(fwts_framework *fw, bool warn)
> +int fwts_check_root_euid(fwts_framework *fw, const bool warn)
>   {
>   	if (geteuid() != 0) {
>   		if (warn)
>

Acked-by: Ivan Hu <ivan.hu@canonical.com>

Patch

diff --git a/src/lib/include/fwts_checkeuid.h b/src/lib/include/fwts_checkeuid.h
index fb2ce29..3669e39 100644
--- a/src/lib/include/fwts_checkeuid.h
+++ b/src/lib/include/fwts_checkeuid.h
@@ -22,6 +22,6 @@ 
 
 #include "fwts_framework.h"
 
-int fwts_check_root_euid(fwts_framework *fw, bool warn);
+int fwts_check_root_euid(fwts_framework *fw, const bool warn);
 
 #endif
diff --git a/src/lib/src/fwts_checkeuid.c b/src/lib/src/fwts_checkeuid.c
index da4c32c..756ed81 100644
--- a/src/lib/src/fwts_checkeuid.c
+++ b/src/lib/src/fwts_checkeuid.c
@@ -28,7 +28,7 @@ 
  *  fwts_check_root_euid()
  *	Check if user has privileges to access ports, memory, etc
  */
-int fwts_check_root_euid(fwts_framework *fw, bool warn)
+int fwts_check_root_euid(fwts_framework *fw, const bool warn)
 {
 	if (geteuid() != 0) {
 		if (warn)