Re: [PATCH] bsearch.3: Declare variables with different types in different lines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/7/20 11:27 PM, Alejandro Colomar wrote:
> Signed-off-by: Alejandro Colomar <colomar.6.4.3@xxxxxxxxx>
> ---
>  man3/bsearch.3 | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Thanks, Alex. Patch applied.

Cheers,

Michael

> 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);
> 


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux