lkml.org 
[lkml]   [2011]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [Patch] Scm: Remove unnecessary pid & credential references in Unix socket's send and receive path
From
From: Tim Chen <tim.c.chen@linux.intel.com>
Date: Wed, 17 Aug 2011 16:56:14 -0700

> +static __inline__ void scm_release(struct scm_cookie *scm)
> +{
> + /* keep ref on pid and cred */
> + scm->pid = NULL;
> + scm->cred = NULL;
> + if (scm && scm->fp)
> + __scm_destroy(scm);
> +}

After dereferencing scm-> already, it seems a big redundant to test
it subsequently against NULL.


\
 
 \ /
  Last update: 2011-08-19 07:07    [W:0.082 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site