ACK: [PATCH] bios: bios_info: make struct fields const

ivanhu ivan.hu at canonical.com
Wed Apr 21 07:09:42 UTC 2021



On 4/12/21 5:07 PM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
> 
> The struct fields are read-only, so make them const
> 
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>  src/bios/bios_info/bios_info.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/bios/bios_info/bios_info.c b/src/bios/bios_info/bios_info.c
> index 60f69f86..45dd9e03 100644
> --- a/src/bios/bios_info/bios_info.c
> +++ b/src/bios/bios_info/bios_info.c
> @@ -25,8 +25,8 @@
>  #include <limits.h>
>  
>  typedef struct {
> -	char *dmi_field;
> -	char *label;
> +	const char *dmi_field;
> +	const char *label;
>  } fwts_bios_info;
>  
>  static const fwts_bios_info bios_info[] = {
> 


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



More information about the fwts-devel mailing list