unpack_device_path() must not modify the efi_device_path * argument, so
make that sure by making it const.

Signed-off-by: Sascha Hauer <[email protected]>
---
 common/efi-devicepath.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/common/efi-devicepath.c b/common/efi-devicepath.c
index f17b9294cc..92c3ac8cee 100644
--- a/common/efi-devicepath.c
+++ b/common/efi-devicepath.c
@@ -468,9 +468,10 @@ device_path_from_handle(efi_handle_t Handle)
 }
 
 static struct efi_device_path *
-unpack_device_path(struct efi_device_path *dev_path)
+unpack_device_path(const struct efi_device_path *dev_path)
 {
-       struct efi_device_path *Src, *Dest, *new_path;
+       const struct efi_device_path *Src;
+       struct efi_device_path *Dest, *new_path;
        unsigned long Size;
 
        /* Walk device path and round sizes to valid boundaries */
-- 
2.30.2


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

Reply via email to