lkml.org 
[lkml]   [2006]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5/7] pid: Implement pid_nr

>> +static inline pid_t pid_nr(struct pid *pid)
>> +{
>> + pid_t nr = 0;
>> + if (pid)
>> + nr = pid->nr;
>> + return nr;
>> +}
>
>When is it valid to be passing around a NULL 'struct pid *'?

Is 0 even the right thing to return in the rare case that pid == NULL?
-1 maybe?


Jan Engelhardt
--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-08-16 18:37    [W:0.136 / U:0.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site