"Michael Kerrisk" <[EMAIL PROTECTED]> writes:
> I have fixed this in the upstream 2.21 release by including a small
> example that demonstrates how strcmp() should be used (like in the
> page you refer to).
Thanks for your quick reply. Just another minor suggestion, the
example code uses:
qsort(months, nr_of_months, sizeof(struct mi), compmi);
[...]
res = bsearch(&key, months, nr_of_months,
sizeof(struct mi), compmi);
I think it would be better to use
qsort(months, nr_of_months, sizeof *months, compmi);
[...]
res = bsearch(&key, months, nr_of_months,
sizeof *months, compmi);
since this is more robust against changes and easier to verify for a
human reader.
--
Falk
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]