From 63c28bf42033972c0471cb9843581d4e1814140c Mon Sep 17 00:00:00 2001 From: dzwdz Date: Thu, 30 Jun 2022 17:31:40 +0200 Subject: shared/mem: explicitly discard the const qualifier in memchr --- src/shared/mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/shared/mem.c') 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; } -- cgit v1.2.3