All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zkabelac@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH] Remove the double open with same mode
Date: Mon, 15 Mar 2010 09:59:30 +0100	[thread overview]
Message-ID: <4B9DF6F2.5040403@redhat.com> (raw)
In-Reply-To: <20100313041826.GB7267@agk-dp.fab.redhat.com>

On 13.3.2010 05:18, Alasdair G Kergon wrote:
> On Fri, Mar 12, 2010 at 04:17:56PM -0800, Malahal Naineni wrote:
>>  	if ((open("/dev/null", O_RDONLY) < 0) ||
>> -	    (open("/dev/null", O_WRONLY) < 0) ||
>>  	    (open("/dev/null", O_WRONLY) < 0))
>>  		exit(EXIT_DESC_OPEN_FAILURE);
> 
> stdin, stdout, stderr
> 
> Alasdair
> 

IMHO it's probably worth to add comment to code, so there will not be similar
'optimizations' proposed in the future.

Zdenek.



  reply	other threads:[~2010-03-15  8:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-13  0:17 [PATCH] Remove the double open with same mode Malahal Naineni
2010-03-13  4:18 ` Alasdair G Kergon
2010-03-15  8:59   ` Zdenek Kabelac [this message]
2010-03-15 15:37     ` Bryn M. Reeves
2010-03-15 16:58     ` Tim Post
2010-03-15 17:41   ` malahal
2010-03-15 18:16     ` Alasdair G Kergon

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=4B9DF6F2.5040403@redhat.com \
    --to=zkabelac@redhat.com \
    --cc=lvm-devel@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.