ACK: [PATCH 46/46] uefi: uefivarinfo: reduce scope of variables

Alex Hung alex.hung at canonical.com
Tue Jan 20 08:06:32 UTC 2015


On 01/14/2015 03:05 AM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
> 
> cppcheck is picking up some minor style issues which can
> be easily fixed:
> 
> [src/uefi/uefivarinfo/uefivarinfo.c:70]:
> 	(style) The scope of the variable 'ioret' can be reduced.
> 
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>  src/uefi/uefivarinfo/uefivarinfo.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/uefi/uefivarinfo/uefivarinfo.c b/src/uefi/uefivarinfo/uefivarinfo.c
> index 7310931..75b62db 100644
> --- a/src/uefi/uefivarinfo/uefivarinfo.c
> +++ b/src/uefi/uefivarinfo/uefivarinfo.c
> @@ -67,7 +67,6 @@ static int do_checkvariables(
>  	uint64_t *usedvarssize,
>  	const uint64_t maxvarsize)
>  {
> -	long ioret;
>  	uint64_t status;
>  
>  	struct efi_getnextvariablename getnextvariablename;
> @@ -97,6 +96,8 @@ static int do_checkvariables(
>  	 */
>  	variablename[0] = '\0';
>  	while (true) {
> +		long ioret;
> +
>  		variablenamesize = MAX_VARNAME_LENGTH;
>  		ioret = ioctl(fd, EFI_RUNTIME_GET_NEXTVARIABLENAME, &getnextvariablename);
>  
> 

Acked-by: Alex Hung <alex.hung at canonical.com>



More information about the fwts-devel mailing list