[glib] Eliminate some dead code
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Eliminate some dead code
- Date: Wed, 15 Jun 2011 01:07:32 +0000 (UTC)
commit a6b9db6907117639b2493e96f8dee9e54bdba788
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Jun 14 20:44:15 2011 -0400
Eliminate some dead code
glib/gspawn.c | 13 +++++--------
1 files changed, 5 insertions(+), 8 deletions(-)
---
diff --git a/glib/gspawn.c b/glib/gspawn.c
index 1eed98e..4eaa33f 100644
--- a/glib/gspawn.c
+++ b/glib/gspawn.c
@@ -173,11 +173,10 @@ read_data (GString *str,
gint fd,
GError **error)
{
- gssize bytes;
- gchar buf[4096];
+ gssize bytes;
+ gchar buf[4096];
again:
-
bytes = read (fd, buf, 4096);
if (bytes == 0)
@@ -187,9 +186,9 @@ read_data (GString *str,
g_string_append_len (str, buf, bytes);
return READ_OK;
}
- else if (bytes < 0 && errno == EINTR)
+ else if (errno == EINTR)
goto again;
- else if (bytes < 0)
+ else
{
int errsv = errno;
@@ -198,11 +197,9 @@ read_data (GString *str,
G_SPAWN_ERROR_READ,
_("Failed to read data from child process (%s)"),
g_strerror (errsv));
-
+
return READ_FAILED;
}
- else
- return READ_OK;
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]