From 3338a96cc71285d4bb2cf3fa4849734b29b63509 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 6 Oct 2009 11:58:00 +0000 Subject: [PATCH] fix --- src/util/disk.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/util/disk.c b/src/util/disk.c index 07b25674e..42d5862a7 100644 --- a/src/util/disk.c +++ b/src/util/disk.c @@ -1602,9 +1602,7 @@ GNUNET_DISK_pipe (int blocking) { struct GNUNET_DISK_PipeHandle *p; struct GNUNET_DISK_FileHandle *fds; - int err; - err = GNUNET_NO; p = GNUNET_malloc (sizeof (struct GNUNET_DISK_PipeHandle) + 2 * sizeof (struct GNUNET_DISK_FileHandle)); fds = (struct GNUNET_DISK_FileHandle *) &p[1]; p->fd[0] = &fds[0]; @@ -1618,9 +1616,9 @@ GNUNET_DISK_pipe (int blocking) ret = pipe (fd); if (ret == -1) { - err = errno; + eno = errno; GNUNET_free (p); - errno = err; + errno = eno; return NULL; } p->fd[0]->fd = fd[0]; @@ -1640,9 +1638,8 @@ GNUNET_DISK_pipe (int blocking) { eno = errno; GNUNET_log_strerror(GNUNET_ERROR_TYPE_ERROR, "fcntl"); - close (p->fd[0]->fd); - close (p->fd[1]->fd); - err = GNUNET_YES; + GNUNET_break (0 == close (p->fd[0]->fd)); + GNUNET_break (0 == close (p->fd[1]->fd)); GNUNET_free (p); errno = eno; return NULL; -- 2.25.1