diff options
| author | Alejandro Colomar <colomar.6.4.3@gmail.com> | 2020-09-05 17:15:00 +0200 |
|---|---|---|
| committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2020-09-06 14:58:29 +0200 |
| commit | 684130db5c612fb91e348d87efd0c353c6ef2cfe (patch) | |
| tree | ce1bc23f2b9126903f356966ae44baa593c38c8c | |
| parent | dc0bba35e720ffbe3717130c9dd459a0a0f186ba (diff) | |
| download | man-pages-684130db5c612fb91e348d87efd0c353c6ef2cfe.tar.gz | |
bsearch.3: Fix intermediate type and remove unneeded casts
Casting `const void *` to `struct mi *` should result in a warning if
done implicitly. The explicit cast was probably silencing that warning.
`const` can and should be kept.
Now, casting `const void *` to `const struct mi *` is done implicitly.
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
| -rw-r--r-- | man3/bsearch.3 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/man3/bsearch.3 b/man3/bsearch.3 index 6dfd5158f3..9d4f76da53 100644 --- a/man3/bsearch.3 +++ b/man3/bsearch.3 @@ -114,8 +114,8 @@ struct mi { static int compmi(const void *m1, const void *m2) { - struct mi *mi1 = (struct mi *) m1; - struct mi *mi2 = (struct mi *) m2; + const struct mi *mi1 = m1; + const struct mi *mi2 = m2; return strcmp(mi1\->name, mi2\->name); } |
