summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/pipe.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2011-11-23 21:58:43 +0000
committerChristopher Faylor <me@cgf.cx>2011-11-23 21:58:43 +0000
commit5f38ec468115a6ddf2c458f2b8f9c4abfd8b0359 (patch)
tree02842aecf3c981e701c99190a13b333f73c2f8b7 /winsup/cygwin/pipe.cc
parent9f65451e3e9b5a3a5c7c35343daee24a09d1d3a2 (diff)
downloadcygnal-5f38ec468115a6ddf2c458f2b8f9c4abfd8b0359.tar.gz
cygnal-5f38ec468115a6ddf2c458f2b8f9c4abfd8b0359.tar.bz2
cygnal-5f38ec468115a6ddf2c458f2b8f9c4abfd8b0359.zip
* pipe.cc (fhandler_pipe::create): Avoid derefencing a NULL pointer.
* child_info.h (child_info): Reorganize some elements so that the ones which are initialized in a constructor are all together. * sigproc.cc (child_info::child_info): Initialize values via the constructor rather than as C statements and make sure that flags is set to zero initially. * spawn.cc (child_info_spawn::worker): Use iscygwin() test for determining when to send strace info since it is more foolproof than checking the suspend state.
Diffstat (limited to 'winsup/cygwin/pipe.cc')
-rw-r--r--winsup/cygwin/pipe.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/pipe.cc b/winsup/cygwin/pipe.cc
index 60b59ff62..11ba794b0 100644
--- a/winsup/cygwin/pipe.cc
+++ b/winsup/cygwin/pipe.cc
@@ -264,14 +264,14 @@ fhandler_pipe::create (LPSECURITY_ATTRIBUTES sa_ptr, PHANDLE r, PHANDLE w,
/* The pipe is already open with compatible parameters.
Pick a new name and retry. */
debug_printf ("pipe busy", !name ? ", retrying" : "");
- if (!*name)
+ if (!name)
*r = NULL;
break;
case ERROR_ACCESS_DENIED:
/* The pipe is already open with incompatible parameters.
Pick a new name and retry. */
debug_printf ("pipe access denied%s", !name ? ", retrying" : "");
- if (!*name)
+ if (!name)
*r = NULL;
break;
default: