gfiledescriptorbased: Fix incorrect precondition return value

`0` is a valid FD, `-1` is not, so `-1` is more suitable to use.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
Philip Withnall 2024-02-06 15:42:14 +00:00
parent 20c7479cc8
commit 15cef2ea59

View File

@ -63,7 +63,7 @@ g_file_descriptor_based_get_fd (GFileDescriptorBased *fd_based)
{
GFileDescriptorBasedIface *iface;
g_return_val_if_fail (G_IS_FILE_DESCRIPTOR_BASED (fd_based), 0);
g_return_val_if_fail (G_IS_FILE_DESCRIPTOR_BASED (fd_based), -1);
iface = G_FILE_DESCRIPTOR_BASED_GET_IFACE (fd_based);