git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Sixt <j6t@kdbg.org>
To: Jonathan Nieder <jrnieder@gmail.com>,
	Johannes Schindelin <johannes.schindelin@gmx.de>
Cc: git@vger.kernel.org, "Jose F. Morales" <jfmcjf@gmail.com>
Subject: Re: [PATCH] Mingw: verify both ends of the pipe () call
Date: Fri, 28 Aug 2015 10:07:42 +0200	[thread overview]
Message-ID: <55E016CE.3070009@kdbg.org> (raw)
In-Reply-To: <20150827215014.GA8165@google.com>

Am 27.08.2015 um 23:50 schrieb Jonathan Nieder:
> Johannes Schindelin wrote:
>
>> From: jfmc <jfmcjf@gmail.com>
>
> This means the name shown by git shortlog would be jfmc instead of
> Jose F. Morales.  Intended?
>
>> The code to open and test the second end of the pipe clearly imitates
>> the code for the first end. A little too closely, though... Let's fix
>> the obvious copy-edit bug.
>>
>> Signed-off-by: Jose F. Morales <jfmcjf@gmail.com>
>> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
>> ---
>>   compat/mingw.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
>
> This is an old one --- more than 5 years old (since v1.7.0-rc0~86^2~4
> "Windows: simplify the pipe(2) implementation", 2010-01-15).  Thanks
> for catching it.

Ouch! Thanks for cleaning up the mess I left behind.

-- Hannes

>
> Regards,
> Jonathan
>
> (patch kept unsnipped for reference)
>
>> diff --git a/compat/mingw.c b/compat/mingw.c
>> index 496e6f8..f74da23 100644
>> --- a/compat/mingw.c
>> +++ b/compat/mingw.c
>> @@ -681,7 +681,7 @@ int pipe(int filedes[2])
>>   		return -1;
>>   	}
>>   	filedes[1] = _open_osfhandle((int)h[1], O_NOINHERIT);
>> -	if (filedes[0] < 0) {
>> +	if (filedes[1] < 0) {
>>   		close(filedes[0]);
>>   		CloseHandle(h[1]);
>>   		return -1;
>>

  reply	other threads:[~2015-08-28  8:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-27 15:55 [PATCH] Mingw: verify both ends of the pipe () call Johannes Schindelin
2015-08-27 16:09 ` Johannes Schindelin
2015-08-27 21:50 ` Jonathan Nieder
2015-08-28  8:07   ` Johannes Sixt [this message]
     [not found]   ` <CAEdsdLdEC7KCgYeu8zmPZWm8uORCwshQo2u9FYQKjrq-sV_bZg@mail.gmail.com>
2015-08-28  9:39     ` Johannes Schindelin
2015-08-28  9:44       ` Johannes Schindelin
2015-08-28  9:52   ` Johannes Schindelin
2015-08-28  9:43 ` [PATCH v2] " Johannes Schindelin
2015-08-28 18:14   ` Junio C Hamano

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=55E016CE.3070009@kdbg.org \
    --to=j6t@kdbg.org \
    --cc=git@vger.kernel.org \
    --cc=jfmcjf@gmail.com \
    --cc=johannes.schindelin@gmx.de \
    --cc=jrnieder@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).