[PATCH 5/9] utils: Follow constParameterPointer and constVariablePointer suggestions of ccpcheck

1 view
Skip to first unread message

Jan Kiszka

unread,
May 14, 2025, 4:15:04 PMMay 14
to efibootg...@googlegroups.com
From: Jan Kiszka <jan.k...@siemens.com>

Signed-off-by: Jan Kiszka <jan.k...@siemens.com>
---
include/utils.h | 2 +-
utils.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/utils.h b/include/utils.h
index 2b4f862..101e30b 100644
--- a/include/utils.h
+++ b/include/utils.h
@@ -39,7 +39,7 @@ EFI_STATUS get_volumes(VOLUME_DESC **volumes, UINTN *count);
EFI_STATUS close_volumes(VOLUME_DESC *volumes, UINTN count);
EFI_DEVICE_PATH *FileDevicePathFromConfig(EFI_HANDLE device,
CHAR16 *payloadpath);
-CHAR16 *GetBootMediumPath(CHAR16 *input);
+CHAR16 *GetBootMediumPath(const CHAR16 *input);

typedef EFI_STATUS (*WATCHDOG_PROBE)(EFI_PCI_IO *, UINT16, UINT16, UINTN);
#define _CONCAT(prefix, func) prefix ## func
diff --git a/utils.c b/utils.c
index 6bc32a0..30f8513 100644
--- a/utils.c
+++ b/utils.c
@@ -244,7 +244,7 @@ EFI_DEVICE_PATH *FileDevicePathFromConfig(EFI_HANDLE device,

if (prefixlen > 0) {
for (UINTN v = 0; v < volume_count; v++) {
- CHAR16 *src;
+ const CHAR16 *src;
switch (lm) {
case DOSFSLABEL:
src = volumes[v].fslabel;
@@ -282,7 +282,7 @@ EFI_DEVICE_PATH *FileDevicePathFromConfig(EFI_HANDLE device,
return appendeddevpath;
}

-CHAR16 *GetBootMediumPath(CHAR16 *input)
+CHAR16 *GetBootMediumPath(const CHAR16 *input)
{
CHAR16 *dst;
UINTN len;
--
2.43.0

Reply all
Reply to author
Forward
0 new messages