From 03c51e95a7b6b4c53fe53bda761398a06d52d4af Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 20 Feb 2008 18:52:10 +0000 Subject: [PATCH] even more cases of not returning in error path 2008-02-20 Benjamin Otte * gfile.c: (g_file_mount_mountable), (g_file_unmount_mountable), (g_file_eject_mountable): even more cases of not returning in error path svn path=/trunk/; revision=6545 --- gio/ChangeLog | 6 ++++++ gio/gfile.c | 51 +++++++++++++++++++++++++++++---------------------- 2 files changed, 35 insertions(+), 22 deletions(-) diff --git a/gio/ChangeLog b/gio/ChangeLog index 5705a03..0e3615a 100644 --- a/gio/ChangeLog +++ b/gio/ChangeLog @@ -1,5 +1,11 @@ 2008-02-20 Benjamin Otte + * gfile.c: (g_file_mount_mountable), (g_file_unmount_mountable), + (g_file_eject_mountable): + even more cases of not returning in error path + +2008-02-20 Benjamin Otte + * gfile.c: (g_file_mount_mountable): return from function in error path. diff --git a/gio/gfile.c b/gio/gfile.c index 12ae8f9..ae00c5a 100644 --- a/gio/gfile.c +++ b/gio/gfile.c @@ -3308,15 +3308,16 @@ g_file_mount_mountable (GFile *file, iface = G_FILE_GET_IFACE (file); - if (iface->mount_mountable == NULL) { - g_simple_async_report_error_in_idle (G_OBJECT (file), - callback, - user_data, - G_IO_ERROR, - G_IO_ERROR_NOT_SUPPORTED, - _("Operation not supported")); - return; - } + if (iface->mount_mountable == NULL) + { + g_simple_async_report_error_in_idle (G_OBJECT (file), + callback, + user_data, + G_IO_ERROR, + G_IO_ERROR_NOT_SUPPORTED, + _("Operation not supported")); + return; + } (* iface->mount_mountable) (file, flags, @@ -3391,12 +3392,15 @@ g_file_unmount_mountable (GFile *file, iface = G_FILE_GET_IFACE (file); if (iface->unmount_mountable == NULL) - g_simple_async_report_error_in_idle (G_OBJECT (file), - callback, - user_data, - G_IO_ERROR, - G_IO_ERROR_NOT_SUPPORTED, - _("Operation not supported")); + { + g_simple_async_report_error_in_idle (G_OBJECT (file), + callback, + user_data, + G_IO_ERROR, + G_IO_ERROR_NOT_SUPPORTED, + _("Operation not supported")); + return; + } (* iface->unmount_mountable) (file, flags, @@ -3470,13 +3474,16 @@ g_file_eject_mountable (GFile *file, iface = G_FILE_GET_IFACE (file); - if (iface->eject_mountable == NULL) - g_simple_async_report_error_in_idle (G_OBJECT (file), - callback, - user_data, - G_IO_ERROR, - G_IO_ERROR_NOT_SUPPORTED, - _("Operation not supported")); + if (iface->eject_mountable == NULL) + { + g_simple_async_report_error_in_idle (G_OBJECT (file), + callback, + user_data, + G_IO_ERROR, + G_IO_ERROR_NOT_SUPPORTED, + _("Operation not supported")); + return; + } (* iface->eject_mountable) (file, flags, -- 2.7.4