From 15cef2ea5992003d7fc2d6cd596563c24ae4640a Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Tue, 6 Feb 2024 15:42:14 +0000 Subject: [PATCH] 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 --- gio/gfiledescriptorbased.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gio/gfiledescriptorbased.c b/gio/gfiledescriptorbased.c index 5ebdf6eca..2647a9b8e 100644 --- a/gio/gfiledescriptorbased.c +++ b/gio/gfiledescriptorbased.c @@ -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);