bsearch.3: Declare variables with different types in different lines
PATCH 1/1 bsearch.3: Declare variables with different types in different lines
Signed-off-by Alejandro Colomar <[email protected]>
--- man3/bsearch.3 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
man3/bsearch.3 +3 -1
@@ -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);
Signature · 1 line
2.28.0
Quoted 4 lines · Alejandro Colomar
Signed-off-by Alejandro Colomar <[email protected]>--- man3/bsearch.3 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Thanks, Alex. Patch applied.
Cheers,
Michael
Quoted 16 lines
man3/bsearch.3 +3
-1@@ -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);
Signature · 3 lines
Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/