From: Corinna Vinschen Date: Wed, 2 Feb 2005 10:09:51 +0000 (+0000) Subject: * pipe.cc (fhandler_pipe::dup): Fix conditionals in case of error. X-Git-Tag: binutils-2_16-branchpoint~105 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=0763734fd96d7d592c2f438f133474c5a2658995;p=newlib-cygwin.git * pipe.cc (fhandler_pipe::dup): Fix conditionals in case of error. --- diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index c222e9835..282b8c67c 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +2005-02-02 Corinna Vinschen + + * pipe.cc (fhandler_pipe::dup): Fix conditionals in case of error. + 2005-02-02 Corinna Vinschen * times.cc (utimes): Mark st_ctime for update according to SUSv3. diff --git a/winsup/cygwin/pipe.cc b/winsup/cygwin/pipe.cc index 7dbd87a5f..498b17206 100644 --- a/winsup/cygwin/pipe.cc +++ b/winsup/cygwin/pipe.cc @@ -1,6 +1,7 @@ /* pipe.cc: pipe for Cygwin. - Copyright 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. + Copyright 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, + 2005 Red Hat, Inc. This file is part of Cygwin. @@ -240,11 +241,11 @@ fhandler_pipe::dup (fhandler_base *child) goto out; err: - if (!ftp->guard) + if (ftp->guard) CloseHandle (ftp->guard); - if (!ftp->writepipe_exists) + if (ftp->writepipe_exists) CloseHandle (ftp->writepipe_exists); - if (!ftp->read_state) + if (ftp->read_state) CloseHandle (ftp->read_state); goto leave;