ACK: [PATCH] uefi: uefirtvariable: clean up cppcheck style warning
ivanhu
ivan.hu at canonical.com
Thu Aug 6 07:14:54 UTC 2015
On 2015年08月05日 15:50, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> cppcheck found a minor style issue:
>
> [src/uefi/uefirtvariable/uefirtvariable.c:470]:
> (style) The scope of the variable 'ioret' can be reduced.
>
> Clean this up.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> src/uefi/uefirtvariable/uefirtvariable.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/uefi/uefirtvariable/uefirtvariable.c b/src/uefi/uefirtvariable/uefirtvariable.c
> index e59e005..b3c7559 100644
> --- a/src/uefi/uefirtvariable/uefirtvariable.c
> +++ b/src/uefi/uefirtvariable/uefirtvariable.c
> @@ -467,7 +467,6 @@ static bool strlen_valid(const uint16_t *variablename, const uint64_t variablena
>
> static int getnextvariable_test2(fwts_framework *fw)
> {
> - long ioret;
> uint64_t status;
>
> struct efi_getnextvariablename getnextvariablename;
> @@ -494,6 +493,8 @@ static int getnextvariable_test2(fwts_framework *fw)
> */
> variablename[0] = '\0';
> while (true) {
> + long ioret;
> +
> variablenamesize = maxvariablenamesize;
> ioret = ioctl(fd, EFI_RUNTIME_GET_NEXTVARIABLENAME, &getnextvariablename);
>
Acked-by: Ivan Hu <ivan.hu at canonical.com>
More information about the fwts-devel
mailing list