This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] misc cleanups to linux_nat_close


On 08/19/2014 12:14 AM, Doug Evans wrote:
> Hi.
> 
> I think this falls under obvious, but in case anyone wants to comment ...

Yeah, it was one of those "to fix later" things, while to_close didn't
gain a self pointer:

 https://sourceware.org/ml/gdb-patches/2014-01/msg00424.html

Thanks for doing this.

-- 
Pedro Alves

> 
> 2014-08-18  Doug Evans  <dje@google.com>
> 
> 	* linux-nat.c (linux_nat_close): Don't pass NULL for "this".
> 	Pass NULL instead of 0 for context pointer.
> 
> diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
> index 1e8991d..0898442 100644
> --- a/gdb/linux-nat.c
> +++ b/gdb/linux-nat.c
> @@ -4813,8 +4813,8 @@ static void
>  linux_nat_close (struct target_ops *self)
>  {
>    /* Unregister from the event loop.  */
> -  if (linux_nat_is_async_p (NULL))
> -    linux_nat_async (NULL, NULL, 0);
> +  if (linux_nat_is_async_p (self))
> +    linux_nat_async (self, NULL, NULL);
>  
>    if (linux_ops->to_close)
>      linux_ops->to_close (linux_ops);
> 



-- 
Thanks,
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]