From b33535f5350014ede89397d2a6a9c79055626696 Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Mon, 7 Sep 2020 23:27:42 +0200 Subject: [PATCH] bsearch.3: Declare variables with different types in different lines Signed-off-by: Alejandro Colomar Signed-off-by: Michael Kerrisk --- man3/bsearch.3 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/man3/bsearch.3 b/man3/bsearch.3 index 9d4f76da5..c429e4ac1 100644 --- a/man3/bsearch.3 +++ b/man3/bsearch.3 @@ -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);