summaryrefslogtreecommitdiffstats
path: root/src/interface/efi/efi_local.c
diff options
context:
space:
mode:
authorMichael Brown2022-12-22 14:28:06 +0100
committerMichael Brown2022-12-22 14:30:02 +0100
commit0f3ace92c6f7bd60a6688c0bacfa5aeacfdb5b73 (patch)
treea46994764981346594cd01d8347761327fc5a847 /src/interface/efi/efi_local.c
parent[efi] Provide VLAN configuration protocol (diff)
downloadipxe-0f3ace92c6f7bd60a6688c0bacfa5aeacfdb5b73.tar.gz
ipxe-0f3ace92c6f7bd60a6688c0bacfa5aeacfdb5b73.tar.xz
ipxe-0f3ace92c6f7bd60a6688c0bacfa5aeacfdb5b73.zip
[efi] Allow passing a NULL device path to path utility functions
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/interface/efi/efi_local.c')
-rw-r--r--src/interface/efi/efi_local.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/interface/efi/efi_local.c b/src/interface/efi/efi_local.c
index 4ebca572..d8edb626 100644
--- a/src/interface/efi/efi_local.c
+++ b/src/interface/efi/efi_local.c
@@ -425,7 +425,7 @@ static int efi_local_open_resolved ( struct efi_local *local,
static int efi_local_open_path ( struct efi_local *local, const char *path ) {
FILEPATH_DEVICE_PATH *fp = container_of ( efi_loaded_image->FilePath,
FILEPATH_DEVICE_PATH, Header);
- size_t fp_len = ( fp ? efi_path_len ( &fp->Header ) : 0 );
+ size_t fp_len = efi_path_len ( &fp->Header );
char base[ fp_len / 2 /* Cannot exceed this length */ ];
size_t remaining = sizeof ( base );
size_t len;