diff mbox series

lib: fwts_framework: make several int fields into uint32_t

Message ID 20170906091634.20152-1-colin.king@canonical.com
State Accepted
Headers show
Series lib: fwts_framework: make several int fields into uint32_t | expand

Commit Message

Colin Ian King Sept. 6, 2017, 9:16 a.m. UTC
From: Colin Ian King <colin.king@canonical.com>

There are some counters that are never going to be negative, so make
them uint32_t rather than int types.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/lib/include/fwts_framework.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Alex Hung Sept. 7, 2017, 1:46 a.m. UTC | #1
On 2017-09-06 02:16 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> There are some counters that are never going to be negative, so make
> them uint32_t rather than int types.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/lib/include/fwts_framework.h | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/src/lib/include/fwts_framework.h b/src/lib/include/fwts_framework.h
> index 3f15312b..2db88bea 100644
> --- a/src/lib/include/fwts_framework.h
> +++ b/src/lib/include/fwts_framework.h
> @@ -127,10 +127,10 @@ struct fwts_framework {
>   
>   	fwts_framework_flags flags;
>   
> -	int current_minor_test_num;		/* Nth minor test being run in a test module */
> +	uint32_t current_minor_test_num;	/* Nth minor test being run in a test module */
>   	const char *current_minor_test_name;	/* Name of current minor test being run */
> -	int current_major_test_num;		/* Nth major test being currently run */
> -	int major_tests_total;			/* Total number of major tests */
> +	uint32_t current_major_test_num;	/* Nth major test being currently run */
> +	uint32_t major_tests_total;		/* Total number of major tests */
>   
>   	struct fwts_framework_test *current_major_test; /* current test */
>   
> @@ -139,7 +139,7 @@ struct fwts_framework {
>   
>   	uint32_t	total_run;		/* total number of major tests run */
>   
> -	int minor_test_progress;		/* Percentage completion of current test */
> +	uint32_t minor_test_progress;		/* Percentage completion of current test */
>   	bool print_summary;			/* Print summary of results at end of test runs */
>   	fwts_log_level failed_level;		/* Bit mask of failed levels in test run */
>   	fwts_log_level filter_level;		/* --log-level option filter */
> 


Acked-by: Alex Hung <alex.hung@canonical.com>
Ivan Hu Sept. 21, 2017, 7:57 a.m. UTC | #2
On 09/06/2017 05:16 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> There are some counters that are never going to be negative, so make
> them uint32_t rather than int types.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/lib/include/fwts_framework.h | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/src/lib/include/fwts_framework.h b/src/lib/include/fwts_framework.h
> index 3f15312b..2db88bea 100644
> --- a/src/lib/include/fwts_framework.h
> +++ b/src/lib/include/fwts_framework.h
> @@ -127,10 +127,10 @@ struct fwts_framework {
>   
>   	fwts_framework_flags flags;
>   
> -	int current_minor_test_num;		/* Nth minor test being run in a test module */
> +	uint32_t current_minor_test_num;	/* Nth minor test being run in a test module */
>   	const char *current_minor_test_name;	/* Name of current minor test being run */
> -	int current_major_test_num;		/* Nth major test being currently run */
> -	int major_tests_total;			/* Total number of major tests */
> +	uint32_t current_major_test_num;	/* Nth major test being currently run */
> +	uint32_t major_tests_total;		/* Total number of major tests */
>   
>   	struct fwts_framework_test *current_major_test; /* current test */
>   
> @@ -139,7 +139,7 @@ struct fwts_framework {
>   
>   	uint32_t	total_run;		/* total number of major tests run */
>   
> -	int minor_test_progress;		/* Percentage completion of current test */
> +	uint32_t minor_test_progress;		/* Percentage completion of current test */
>   	bool print_summary;			/* Print summary of results at end of test runs */
>   	fwts_log_level failed_level;		/* Bit mask of failed levels in test run */
>   	fwts_log_level filter_level;		/* --log-level option filter */
> 

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

Patch

diff --git a/src/lib/include/fwts_framework.h b/src/lib/include/fwts_framework.h
index 3f15312b..2db88bea 100644
--- a/src/lib/include/fwts_framework.h
+++ b/src/lib/include/fwts_framework.h
@@ -127,10 +127,10 @@  struct fwts_framework {
 
 	fwts_framework_flags flags;
 
-	int current_minor_test_num;		/* Nth minor test being run in a test module */
+	uint32_t current_minor_test_num;	/* Nth minor test being run in a test module */
 	const char *current_minor_test_name;	/* Name of current minor test being run */
-	int current_major_test_num;		/* Nth major test being currently run */
-	int major_tests_total;			/* Total number of major tests */
+	uint32_t current_major_test_num;	/* Nth major test being currently run */
+	uint32_t major_tests_total;		/* Total number of major tests */
 
 	struct fwts_framework_test *current_major_test; /* current test */
 
@@ -139,7 +139,7 @@  struct fwts_framework {
 
 	uint32_t	total_run;		/* total number of major tests run */
 
-	int minor_test_progress;		/* Percentage completion of current test */
+	uint32_t minor_test_progress;		/* Percentage completion of current test */
 	bool print_summary;			/* Print summary of results at end of test runs */
 	fwts_log_level failed_level;		/* Bit mask of failed levels in test run */
 	fwts_log_level filter_level;		/* --log-level option filter */