mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Use __DECONST to avoid compiler warnings (and thus build failures)
with gcc on sparc64, mips, and powerpc after r271173.
This commit is contained in:
parent
313ef9368f
commit
afa0a6efe0
1 changed files with 2 additions and 2 deletions
|
|
@ -52,9 +52,9 @@ memmem(const void *l, size_t l_len, const void *s, size_t s_len)
|
|||
return memchr(l, (int)*cs, l_len);
|
||||
|
||||
/* the last position where its possible to find "s" in "l" */
|
||||
last = (char *)cl + l_len - s_len;
|
||||
last = __DECONST(char *, cl) + l_len - s_len;
|
||||
|
||||
for (cur = (char *)cl; cur <= last; cur++)
|
||||
for (cur = __DECONST(char *, cl); cur <= last; cur++)
|
||||
if (cur[0] == cs[0] && memcmp(cur, cs, s_len) == 0)
|
||||
return cur;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue