bsearch.3: Declare variables with different types in different lines

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Alejandro Colomar 2020-09-07 23:27:42 +02:00 committed by Michael Kerrisk
parent 037c6fd4ee
commit b33535f535
1 changed files with 3 additions and 1 deletions

View File

@ -124,7 +124,9 @@ main(int argc, char **argv)
{
qsort(months, nr_of_months, sizeof(months[0]), compmi);
for (int i = 1; i < argc; i++) {
struct mi key, *res;
struct mi key;
struct mi *res;
key.name = argv[i];
res = bsearch(&key, months, nr_of_months,
sizeof(months[0]), compmi);