diff options
author | dzwdz | 2022-06-30 17:31:40 +0200 |
---|---|---|
committer | dzwdz | 2022-06-30 17:31:40 +0200 |
commit | 63c28bf42033972c0471cb9843581d4e1814140c (patch) | |
tree | d93b8d63bb684938ad55890a8cadcc30e6eb2279 /src/shared/mem.c | |
parent | 38d9f87c5086ca132fea43912d6f6ad777c2c852 (diff) |
shared/mem: explicitly discard the const qualifier in memchr
Diffstat (limited to 'src/shared/mem.c')
-rw-r--r-- | src/shared/mem.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/mem.c b/src/shared/mem.c index 3075963..0b03b58 100644 --- a/src/shared/mem.c +++ b/src/shared/mem.c @@ -5,7 +5,7 @@ void *memchr(const void *s, int c, size_t n) { const unsigned char *s2 = s; for (size_t i = 0; i < n; i++) { if (s2[i] == (unsigned char)c) - return &s2[i]; + return (void*)&s2[i]; } return NULL; } |