After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 710541 - st-widget: Use g_clear_pointer
st-widget: Use g_clear_pointer
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: st
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2013-10-20 12:04 UTC by drago01
Modified: 2013-10-20 12:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
st-widget: Use g_clear_pointer (1.26 KB, patch)
2013-10-20 12:04 UTC, drago01
committed Details | Review

Description drago01 2013-10-20 12:04:43 UTC
Minor cleanup noticed while looking at bug 710230
Comment 1 drago01 2013-10-20 12:04:45 UTC
Created attachment 257746 [details] [review]
st-widget: Use g_clear_pointer
Comment 2 Florian Müllner 2013-10-20 12:14:20 UTC
Review of attachment 257746 [details] [review]:

Looks good, though you could kill a couple more lines :-)

::: src/st/st-widget.c
@@ +341,2 @@
   if (priv->theme)
+    g_clear_pointer (&priv->theme, g_object_unref);

g_clear_pointer() can be called unconditionally
Comment 3 drago01 2013-10-20 12:25:45 UTC
Pushed with suggested change.

Attachment 257746 [details] pushed as 4d1358b - st-widget: Use g_clear_pointer