summaryrefslogtreecommitdiff
path: root/mate-panel/libpanel-util
diff options
context:
space:
mode:
authorScott Balneaves <[email protected]>2012-11-12 08:54:33 -0600
committerScott Balneaves <[email protected]>2012-11-12 08:54:33 -0600
commitb94aaf81d04f87cfcfde76b68876fbc0d27a8deb (patch)
treea508028c3e29b1fd74d50fb7226625a128cb7500 /mate-panel/libpanel-util
parentcc9615065c128be5924a12df50abfda0c6b74a3a (diff)
downloadmate-panel-b94aaf81d04f87cfcfde76b68876fbc0d27a8deb.tar.bz2
mate-panel-b94aaf81d04f87cfcfde76b68876fbc0d27a8deb.tar.xz
Code audit: fix compile warnings, uninitialized pointer problems
Diffstat (limited to 'mate-panel/libpanel-util')
-rw-r--r--mate-panel/libpanel-util/panel-launch.c17
-rw-r--r--mate-panel/libpanel-util/panel-show.c4
2 files changed, 12 insertions, 9 deletions
diff --git a/mate-panel/libpanel-util/panel-launch.c b/mate-panel/libpanel-util/panel-launch.c
index af2b4282..5479daaa 100644
--- a/mate-panel/libpanel-util/panel-launch.c
+++ b/mate-panel/libpanel-util/panel-launch.c
@@ -58,13 +58,10 @@ _panel_launch_handle_error (const gchar *name,
GError *local_error,
GError **error)
{
- if (local_error == NULL)
- return TRUE;
-
- else if (g_error_matches (local_error,
- G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
- g_error_free (local_error);
- return TRUE;
+ if (g_error_matches (local_error,
+ G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
+ g_error_free (local_error);
+ return TRUE;
}
else if (error != NULL)
@@ -104,6 +101,9 @@ panel_app_info_launch_uris (GAppInfo *appinfo,
g_object_unref (context);
+ if ((local_error == NULL) && (retval == TRUE))
+ return TRUE;
+
return _panel_launch_handle_error (g_app_info_get_name (appinfo),
screen, local_error, error);
}
@@ -229,6 +229,9 @@ panel_launch_desktop_file_with_fallback (const char *desktop_file,
G_SPAWN_SEARCH_PATH,
NULL, NULL, NULL, &local_error);
+ if (local_error == NULL && retval == TRUE)
+ return TRUE;
+
return _panel_launch_handle_error (fallback_exec,
screen, local_error, error);
}
diff --git a/mate-panel/libpanel-util/panel-show.c b/mate-panel/libpanel-util/panel-show.c
index 02ea2e63..5100be88 100644
--- a/mate-panel/libpanel-util/panel-show.c
+++ b/mate-panel/libpanel-util/panel-show.c
@@ -141,8 +141,8 @@ static gboolean _panel_show_handle_error(const gchar* uri, GdkScreen* screen, GE
static gboolean panel_show_caja_search_uri(GdkScreen* screen, const gchar* uri, guint32 timestamp, GError** error)
{
- char* desktopfile;
- GDesktopAppInfo* appinfo;
+ char* desktopfile = NULL;
+ GDesktopAppInfo* appinfo = NULL;
gboolean ret;
desktopfile = panel_g_lookup_in_applications_dirs("caja-folder-handler.desktop");