[gnome-power-manager] trivial: don't return from midway in a function
- From: Richard Hughes <rhughes src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-power-manager] trivial: don't return from midway in a function
- Date: Sat, 11 Jul 2009 08:00:47 +0000 (UTC)
commit 9b63fc5af4bdeaacbaf2d2fda442b000afac1a3c
Author: Richard Hughes <richard hughsie com>
Date: Sat Jul 11 08:59:04 2009 +0100
trivial: don't return from midway in a function
src/gpm-manager.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/gpm-manager.c b/src/gpm-manager.c
index 555f5a6..c6d27bc 100644
--- a/src/gpm-manager.c
+++ b/src/gpm-manager.c
@@ -1025,7 +1025,7 @@ static void
gpm_engine_fully_charged_cb (GpmEngine *engine, DkpDevice *device, GpmManager *manager)
{
DkpDeviceType type;
- gchar *native_path;
+ gchar *native_path = NULL;
gboolean ret;
guint plural = 1;
@@ -1033,7 +1033,7 @@ gpm_engine_fully_charged_cb (GpmEngine *engine, DkpDevice *device, GpmManager *m
ret = gconf_client_get_bool (manager->priv->conf, GPM_CONF_NOTIFY_FULLY_CHARGED, NULL);
if (!ret) {
egg_debug ("no notification");
- return;
+ goto out;
}
/* get device properties */
@@ -1048,6 +1048,7 @@ gpm_engine_fully_charged_cb (GpmEngine *engine, DkpDevice *device, GpmManager *m
plural = 2;
gpm_notify_fully_charged_primary (manager->priv->notify, plural);
}
+out:
g_free (native_path);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]