summaryrefslogtreecommitdiff
path: root/gdb/ser-pipe.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2010-05-16 23:49:58 +0000
committerMichael Snyder <msnyder@vmware.com>2010-05-16 23:49:58 +0000
commit433759f7091e71559584a924e0d18cc8a0770fc9 (patch)
tree9698031d651fcb74c945a760b024f53d7ce5930a /gdb/ser-pipe.c
parentdd304d5382484115a44a2aa81aafbb92e70ae462 (diff)
downloadbinutils-gdb-433759f7091e71559584a924e0d18cc8a0770fc9.tar.gz
2010-05-16 Michael Snyder <msnyder@vmware.com>
* scm-exp.c: White space. * scm-lang.c: White space. * scm-valprint.c: White space. * sentinel-frame.c: White space. * ser-base.c: White space. * ser-go32.c: White space. * serial.c: White space. * ser-mingw.c: White space. * ser-pipe.c: White space. * ser-tcp.c: White space. * ser-unix.c: White space. * solib.c: White space. * solib-darwin.c: White space. * solib-frv.c: White space. * solib-irix.c: White space. * solib-osf.c: White space. * solib-pa64.c: White space. * solib-som.c: White space. * solib-spu.c: White space. * solib-svr4.c: White space. * solib-target.c: White space. * source.c: White space. * stabsread.c: White space. * stack.c: White space. * std-regs.c: White space. * symfile.c: White space. * symmisc.c: White space. * symtab.c: White space.
Diffstat (limited to 'gdb/ser-pipe.c')
-rw-r--r--gdb/ser-pipe.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/ser-pipe.c b/gdb/ser-pipe.c
index 274883c50b1..92ad3d91fd3 100644
--- a/gdb/ser-pipe.c
+++ b/gdb/ser-pipe.c
@@ -63,6 +63,7 @@ pipe_open (struct serial *scb, const char *name)
int pdes[2];
int err_pdes[2];
int pid;
+
if (socketpair (AF_UNIX, SOCK_STREAM, 0, pdes) < 0)
return -1;
if (socketpair (AF_UNIX, SOCK_STREAM, 0, err_pdes) < 0)
@@ -146,6 +147,7 @@ static void
pipe_close (struct serial *scb)
{
struct pipe_state *state = scb->state;
+
if (state != NULL)
{
int pid = state->pid;
@@ -167,6 +169,7 @@ void
_initialize_ser_pipe (void)
{
struct serial_ops *ops = XMALLOC (struct serial_ops);
+
memset (ops, 0, sizeof (struct serial_ops));
ops->name = "pipe";
ops->next = 0;