Message ID | 20170713205135.1538-6-xypron.glpk@gmx.de |
---|---|
State | Superseded |
Delegated to: | Alexander Graf |
Headers | show |
diff --git a/lib/efi_loader/efi_device_path_to_text.c b/lib/efi_loader/efi_device_path_to_text.c index 56de328286..621bc4f528 100644 --- a/lib/efi_loader/efi_device_path_to_text.c +++ b/lib/efi_loader/efi_device_path_to_text.c @@ -30,12 +30,12 @@ uint16_t *efi_convert_device_path_to_text( bool display_only, bool allow_shortcuts) { - EFI_ENTRY("%p, %d, %d", device_path, display_only, allow_shortcuts); - unsigned long buffer_size; efi_status_t r; uint16_t *buffer = NULL; + EFI_ENTRY("%p, %d, %d", device_path, display_only, allow_shortcuts); + if (!device_path) { EFI_EXIT(EFI_INVALID_PARAMETER); return NULL;
Variables should be declared before the first executable statement. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> --- v2 new patch --- lib/efi_loader/efi_device_path_to_text.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)