mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-09 12:25:48 +01:00
Eliminate some dead code
This commit is contained in:
parent
9b68d9892a
commit
a6b9db6907
@ -173,11 +173,10 @@ read_data (GString *str,
|
|||||||
gint fd,
|
gint fd,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
gssize bytes;
|
gssize bytes;
|
||||||
gchar buf[4096];
|
gchar buf[4096];
|
||||||
|
|
||||||
again:
|
again:
|
||||||
|
|
||||||
bytes = read (fd, buf, 4096);
|
bytes = read (fd, buf, 4096);
|
||||||
|
|
||||||
if (bytes == 0)
|
if (bytes == 0)
|
||||||
@ -187,9 +186,9 @@ read_data (GString *str,
|
|||||||
g_string_append_len (str, buf, bytes);
|
g_string_append_len (str, buf, bytes);
|
||||||
return READ_OK;
|
return READ_OK;
|
||||||
}
|
}
|
||||||
else if (bytes < 0 && errno == EINTR)
|
else if (errno == EINTR)
|
||||||
goto again;
|
goto again;
|
||||||
else if (bytes < 0)
|
else
|
||||||
{
|
{
|
||||||
int errsv = errno;
|
int errsv = errno;
|
||||||
|
|
||||||
@ -198,11 +197,9 @@ read_data (GString *str,
|
|||||||
G_SPAWN_ERROR_READ,
|
G_SPAWN_ERROR_READ,
|
||||||
_("Failed to read data from child process (%s)"),
|
_("Failed to read data from child process (%s)"),
|
||||||
g_strerror (errsv));
|
g_strerror (errsv));
|
||||||
|
|
||||||
return READ_FAILED;
|
return READ_FAILED;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
return READ_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user