mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-23 18:52:09 +01:00
gmain: ensure boolean value in g_child_watch_check() is strictly 0 or 1
No problem in practice, but it seems nice to ensure that a gboolean is always either FALSE or TRUE.
This commit is contained in:
parent
ad18d2dad0
commit
bbdcc6e72a
@ -5268,12 +5268,12 @@ g_child_watch_check (GSource *source)
|
||||
child_watch_source = (GChildWatchSource *) source;
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
child_exited = child_watch_source->poll.revents & G_IO_IN;
|
||||
child_exited = !!(child_watch_source->poll.revents & G_IO_IN);
|
||||
#else /* G_OS_WIN32 */
|
||||
#ifdef HAVE_PIDFD
|
||||
if (child_watch_source->poll.fd >= 0)
|
||||
{
|
||||
child_exited = child_watch_source->poll.revents & G_IO_IN;
|
||||
child_exited = !!(child_watch_source->poll.revents & G_IO_IN);
|
||||
return child_exited;
|
||||
}
|
||||
#endif /* HAVE_PIDFD */
|
||||
|
Loading…
x
Reference in New Issue
Block a user