glib r7574 - in trunk: . glib
- From: behdad svn gnome org
- To: svn-commits-list gnome org
- Subject: glib r7574 - in trunk: . glib
- Date: Mon, 6 Oct 2008 22:57:49 +0000 (UTC)
Author: behdad
Date: Mon Oct 6 22:57:49 2008
New Revision: 7574
URL: http://svn.gnome.org/viewvc/glib?rev=7574&view=rev
Log:
2008-10-06 Behdad Esfahbod <behdad gnome org>
Bug 555309 â giochannel breaks on error
Patch from Christian Persch
* glib/giounix.c (g_io_unix_read), (g_io_unix_write),
(g_io_unix_seek), (g_io_unix_close), (g_io_unix_set_flags):
Don't shadow err. Oops!
Modified:
trunk/ChangeLog
trunk/glib/giounix.c
Modified: trunk/glib/giounix.c
==============================================================================
--- trunk/glib/giounix.c (original)
+++ trunk/glib/giounix.c Mon Oct 6 22:57:49 2008
@@ -190,10 +190,10 @@
if (result < 0)
{
- int err = errno;
+ int errsv = errno;
*bytes_read = 0;
- switch (err)
+ switch (errsv)
{
#ifdef EINTR
case EINTR:
@@ -205,8 +205,8 @@
#endif
default:
g_set_error_literal (err, G_IO_CHANNEL_ERROR,
- g_io_channel_error_from_errno (err),
- g_strerror (err));
+ g_io_channel_error_from_errno (errsv),
+ g_strerror (errsv));
return G_IO_STATUS_ERROR;
}
}
@@ -231,10 +231,10 @@
if (result < 0)
{
- int err = errno;
+ int errsv = errno;
*bytes_written = 0;
- switch (err)
+ switch (errsv)
{
#ifdef EINTR
case EINTR:
@@ -246,8 +246,8 @@
#endif
default:
g_set_error_literal (err, G_IO_CHANNEL_ERROR,
- g_io_channel_error_from_errno (err),
- g_strerror (err));
+ g_io_channel_error_from_errno (errsv),
+ g_strerror (errsv));
return G_IO_STATUS_ERROR;
}
}
@@ -297,10 +297,10 @@
if (result < 0)
{
- int err = errno;
+ int errsv = errno;
g_set_error_literal (err, G_IO_CHANNEL_ERROR,
- g_io_channel_error_from_errno (err),
- g_strerror (err));
+ g_io_channel_error_from_errno (errsv),
+ g_strerror (errsv));
return G_IO_STATUS_ERROR;
}
@@ -316,10 +316,10 @@
if (close (unix_channel->fd) < 0)
{
- int err = errno;
+ int errsv = errno;
g_set_error_literal (err, G_IO_CHANNEL_ERROR,
- g_io_channel_error_from_errno (err),
- g_strerror (err));
+ g_io_channel_error_from_errno (errsv),
+ g_strerror (errsv));
return G_IO_STATUS_ERROR;
}
@@ -380,10 +380,10 @@
if (fcntl (unix_channel->fd, F_SETFL, fcntl_flags) == -1)
{
- int err = errno;
+ int errsv = errno;
g_set_error_literal (err, G_IO_CHANNEL_ERROR,
- g_io_channel_error_from_errno (err),
- g_strerror (err));
+ g_io_channel_error_from_errno (errsv),
+ g_strerror (errsv));
return G_IO_STATUS_ERROR;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]