diff options
author | peter <peter@FreeBSD.org> | 2001-09-10 10:33:46 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2001-09-10 10:33:46 +0000 |
commit | ad6be0c2bd2edb2e408a6cf331be4bfa16955946 (patch) | |
tree | f5e744827448c791e841676a3911d196c868cdda /sys/libkern | |
parent | 0e5689df6586ed595c6dbdecf96d70202196e119 (diff) | |
download | FreeBSD-src-ad6be0c2bd2edb2e408a6cf331be4bfa16955946.zip FreeBSD-src-ad6be0c2bd2edb2e408a6cf331be4bfa16955946.tar.gz |
Fix a warning in bsearch(). Like index() etc, it de-qualifies its
arguments. Caveat Emptor. However, the only two consumer of it (cam)
deals with it correctly and preserves the constness.
Diffstat (limited to 'sys/libkern')
-rw-r--r-- | sys/libkern/bsearch.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/libkern/bsearch.c b/sys/libkern/bsearch.c index 6aceaa7..f3f318c 100644 --- a/sys/libkern/bsearch.c +++ b/sys/libkern/bsearch.c @@ -74,7 +74,7 @@ bsearch(key, base0, nmemb, size, compar) p = base + (lim >> 1) * size; cmp = (*compar)(key, p); if (cmp == 0) - return ((void *)p); + return ((void *)(uintptr_t)p); if (cmp > 0) { /* key > p: move right */ base = (const char *)p + size; lim--; |