diff options
Diffstat (limited to 'lib/libc/stdlib/lsearch.c')
-rw-r--r-- | lib/libc/stdlib/lsearch.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/libc/stdlib/lsearch.c b/lib/libc/stdlib/lsearch.c index e4d1dd5..9e9cdba 100644 --- a/lib/libc/stdlib/lsearch.c +++ b/lib/libc/stdlib/lsearch.c @@ -39,11 +39,7 @@ lwork(const void *key, const void *base, size_t *nelp, size_t width, { uint8_t *ep, *endp; - /* - * Cast to an integer value first to avoid the warning for removing - * 'const' via a cast. - */ - ep = (uint8_t *)(uintptr_t)base; + ep = __DECONST(uint8_t *, base); for (endp = (uint8_t *)(ep + width * *nelp); ep < endp; ep += width) { if (compar(key, ep) == 0) return (ep); |