diff options
author | Bastien Nocera <hadess@hadess.net> | 2013-10-10 16:02:05 +0200 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2013-10-14 10:37:03 +0200 |
commit | ad7e809d4d811bead43de58e5041f8d136c88df6 (patch) | |
tree | 293f76f88fba560060eaf527872c7c1b9b6ed4d9 /libupower-glib/up-wakeup-item.c | |
parent | 5f26bc5caa1b1d3ed352702be1fec5d5625ff1d1 (diff) | |
download | upower-ad7e809d4d811bead43de58e5041f8d136c88df6.tar.gz |
lib: Simplify _new() functions
No need to use a temporary variable.
Diffstat (limited to 'libupower-glib/up-wakeup-item.c')
-rw-r--r-- | libupower-glib/up-wakeup-item.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libupower-glib/up-wakeup-item.c b/libupower-glib/up-wakeup-item.c index 7060a3d..0bdd458 100644 --- a/libupower-glib/up-wakeup-item.c +++ b/libupower-glib/up-wakeup-item.c @@ -458,8 +458,6 @@ up_wakeup_item_finalize (GObject *object) UpWakeupItem * up_wakeup_item_new (void) { - UpWakeupItem *wakeup_item; - wakeup_item = g_object_new (UP_TYPE_WAKEUP_ITEM, NULL); - return UP_WAKEUP_ITEM (wakeup_item); + return UP_WAKEUP_ITEM (g_object_new (UP_TYPE_WAKEUP_ITEM, NULL)); } |