mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +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
d5d6ef8f1b
commit
3694dac983
@ -5531,12 +5531,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…
Reference in New Issue
Block a user