summaryrefslogtreecommitdiff
path: root/src/boot/efi/util.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2021-06-02 15:40:56 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2021-06-02 15:40:56 +0900
commitef53d52b01967d1b126ca629bb74fd1b633dcf0c (patch)
tree82aed16d55350285cc115ab8de78042b752c7009 /src/boot/efi/util.c
parent72dc626b3d6905b105ae61ca2c60f51a6f74070e (diff)
downloadsystemd-ef53d52b01967d1b126ca629bb74fd1b633dcf0c.tar.gz
efi: add const qualifier to string utils
Diffstat (limited to 'src/boot/efi/util.c')
-rw-r--r--src/boot/efi/util.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/boot/efi/util.c b/src/boot/efi/util.c
index 0061e03eba..c6aa7954bc 100644
--- a/src/boot/efi/util.c
+++ b/src/boot/efi/util.c
@@ -245,7 +245,7 @@ VOID efivar_set_time_usec(const EFI_GUID *vendor, CHAR16 *name, UINT64 usec) {
efivar_set(vendor, name, str, 0);
}
-static INTN utf8_to_16(CHAR8 *stra, CHAR16 *c) {
+static INTN utf8_to_16(const CHAR8 *stra, CHAR16 *c) {
CHAR16 unichar;
UINTN len;
@@ -296,7 +296,7 @@ static INTN utf8_to_16(CHAR8 *stra, CHAR16 *c) {
return len;
}
-CHAR16 *stra_to_str(CHAR8 *stra) {
+CHAR16 *stra_to_str(const CHAR8 *stra) {
UINTN strlen;
UINTN len;
UINTN i;
@@ -324,7 +324,7 @@ CHAR16 *stra_to_str(CHAR8 *stra) {
return str;
}
-CHAR16 *stra_to_path(CHAR8 *stra) {
+CHAR16 *stra_to_path(const CHAR8 *stra) {
CHAR16 *str;
UINTN strlen;
UINTN len;
@@ -361,10 +361,10 @@ CHAR16 *stra_to_path(CHAR8 *stra) {
return str;
}
-CHAR8 *strchra(CHAR8 *s, CHAR8 c) {
+CHAR8 *strchra(const CHAR8 *s, CHAR8 c) {
do {
if (*s == c)
- return s;
+ return (CHAR8*) s;
} while (*s++);
return NULL;
}