mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-31 06:13:29 +02:00
gmain: remove unnecessary initialization of *timeout in prepare() callbacks
Note that the prepare callback only has one caller, which pre-initializes the timeout argument to -1. That may be an implementation detail and not publicly promised, but it wouldn't make sense to do it any other way in the caller. Also, note that g_unix_signal_watch_prepare() and the UNIX branch of g_child_watch_prepare() already relied on that.
This commit is contained in:
@@ -4003,8 +4003,6 @@ socket_source_prepare (GSource *source,
|
||||
{
|
||||
GSocketSource *socket_source = (GSocketSource *)source;
|
||||
|
||||
*timeout = -1;
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
if ((socket_source->pollfd.revents & G_IO_NVAL) != 0)
|
||||
return TRUE;
|
||||
|
Reference in New Issue
Block a user