Linux Container Development
 help / color / mirror / Atom feed
From: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Sasha Levin <sasha.levin-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Cc: cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] cgroup: remove redundant check
Date: Thu, 20 Dec 2012 11:18:03 -0800	[thread overview]
Message-ID: <20121220191803.GA14527@htj.dyndns.org> (raw)
In-Reply-To: <1356030701-16284-23-git-send-email-sasha.levin-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>

On Thu, Dec 20, 2012 at 02:11:31PM -0500, Sasha Levin wrote:
> We already know that 'event' is non-NULL, remove the redundant check.
> 
> Signed-off-by: Sasha Levin <sasha.levin-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>

I don't know.  I kinda like that test there.  It's not an error path
and tearing down everything which could have been allocated.  If the
test not being used is bothering, convert return -ENOMEM to goto fail?

-- 
tejun

  parent reply	other threads:[~2012-12-20 19:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1356030701-16284-1-git-send-email-sasha.levin@oracle.com>
     [not found] ` <1356030701-16284-1-git-send-email-sasha.levin-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2012-12-20 19:11   ` [PATCH] cgroup: remove redundant check Sasha Levin
     [not found]     ` <1356030701-16284-23-git-send-email-sasha.levin-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2012-12-20 19:18       ` Tejun Heo [this message]
     [not found]         ` <20121220191803.GA14527-Gd/HAXX7CRxy/B6EtB590w@public.gmane.org>
2012-12-20 19:24           ` Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121220191803.GA14527@htj.dyndns.org \
    --to=tj-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=sasha.levin-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox