diff options
author | Danny Holman <dholman@gymli.xyz> | 2021-01-20 22:42:38 -0600 |
---|---|---|
committer | Danny Holman <dholman@gymli.xyz> | 2021-01-20 22:42:38 -0600 |
commit | 7e1bf77c0be04a34d8c4576f030ffc3ef973ac44 (patch) | |
tree | 1d97bfcb92894cfd1668f76e373399fe91818838 /kernel | |
parent | 3898c79cb27f21bc552a341d3d8c26af52263257 (diff) |
kernel: maintain const on strings
Keep const pointers const when casting from void to char.
Signed-off-by: Danny Holman <dholman@gymli.xyz>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/string.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/string.c b/kernel/string.c index 5b5957c..30fe40d 100644 --- a/kernel/string.c +++ b/kernel/string.c @@ -1,8 +1,8 @@ #include <kernel/string.h> int memcmp(const void *str1, const void *str2, size_t n) { - unsigned char *p1 = str1; - unsigned char *p2 = str2; + unsigned char const *p1 = str1; + unsigned char const *p2 = str2; int ret = 0; if (str1 == str2) |