ACK: [PATCH 11/12] uefi: securebootcert: re-arrange code to avoid declarations after code
Alex Hung
alex.hung at canonical.com
Tue Jun 10 18:26:02 UTC 2014
On 06/08/2014 09:42 AM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> src/uefi/securebootcert/securebootcert.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/src/uefi/securebootcert/securebootcert.c b/src/uefi/securebootcert/securebootcert.c
> index 92bf30d..53d9e13 100644
> --- a/src/uefi/securebootcert/securebootcert.c
> +++ b/src/uefi/securebootcert/securebootcert.c
> @@ -176,7 +176,7 @@ static bool check_sigdb_presence(uint8_t *var_data, size_t datalen, uint8_t *key
> return key_found;
>
> for (var_data_addr = var_data; var_data_addr < var_data + datalen; ) {
> -
> + EFI_GUID SignatureOwner;
> siglist = *((EFI_SIGNATURE_LIST *)var_data_addr);
>
> /* check for potential overflow */
> @@ -197,8 +197,7 @@ static bool check_sigdb_presence(uint8_t *var_data, size_t datalen, uint8_t *key
> }
>
> var_data_addr += sizeof(siglist) + siglist.SignatureHeaderSize;
> -
> - EFI_GUID SignatureOwner = *(EFI_GUID *)var_data_addr;
> + SignatureOwner = *(EFI_GUID *)var_data_addr;
>
> if (key_len != (siglist.SignatureSize - sizeof(SignatureOwner))) {
> var_data_addr += siglist.SignatureSize;
> @@ -251,6 +250,7 @@ static void securebootcert_key_ex_key(fwts_framework *fw, fwts_uefi_var *var, ch
> {
>
> bool ident = false;
> + fwts_release *release;
> EFI_GUID global_var_guid = EFI_GLOBAL_VARIABLE;
>
> if (strcmp(varname, "KEK"))
> @@ -265,7 +265,7 @@ static void securebootcert_key_ex_key(fwts_framework *fw, fwts_uefi_var *var, ch
> return;
> }
>
> - fwts_release *release = fwts_release_get();
> + release = fwts_release_get();
> if (release == NULL) {
> fwts_skipped(fw, "Cannot determine system, stop checking the Master CA certificate.");
> return;
>
Acked-by: Alex Hung <alex.hung at canonical.com>
More information about the fwts-devel
mailing list