[Devel] Re: [PATCH 2/3] Prepare pid_nr() etc functions to work with not-NULL pids

Matt Mackall mpm at selenic.com
Wed Oct 3 09:42:58 PDT 2007


On Wed, Oct 03, 2007 at 06:20:43PM +0400, Pavel Emelyanov wrote:
> Just make the __pid_nr() etc functions that expect the argument
> to always be not NULL.
> 
> Signed-off-by: Pavel Emelyanov <xemul at openvz.org>

>  static inline pid_t pid_nr(struct pid *pid)
>  {
>  	pid_t nr = 0;
>  	if (pid)
> -		nr = pid->numbers[0].nr;
> +		nr = __pid_nr(pid);
>  	return nr;
>  }

Is there a patch that removes these inlines? Otherwise this looks good
to me.

--
Mathematics is the supreme nostalgia of our time.




More information about the Devel mailing list