summaryrefslogtreecommitdiff
path: root/src/lib/efreet/efreet_desktop.c
diff options
context:
space:
mode:
authorSebastian Dransfeld <sd@tango.flipp.net>2013-11-20 13:20:03 +0100
committerSebastian Dransfeld <sd@tango.flipp.net>2013-11-21 09:29:25 +0100
commite610047ef3ca52a69f2362702f6c2ff0f0b6a2a3 (patch)
treeed71c8212b8e53565753d75fbf013bdc09db17a7 /src/lib/efreet/efreet_desktop.c
parent3b42ecbe1ece19fd30aca3e54c3d58ad659c50ab (diff)
efreet: store volatile value locally before return
Diffstat (limited to '')
-rw-r--r--src/lib/efreet/efreet_desktop.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/efreet/efreet_desktop.c b/src/lib/efreet/efreet_desktop.c
index 35e20e07c5..9c4c4e7fed 100644
--- a/src/lib/efreet/efreet_desktop.c
+++ b/src/lib/efreet/efreet_desktop.c
@@ -174,11 +174,14 @@ efreet_desktop_get(const char *file)
174EAPI int 174EAPI int
175efreet_desktop_ref(Efreet_Desktop *desktop) 175efreet_desktop_ref(Efreet_Desktop *desktop)
176{ 176{
177 int ret;
178
177 EINA_SAFETY_ON_NULL_RETURN_VAL(desktop, 0); 179 EINA_SAFETY_ON_NULL_RETURN_VAL(desktop, 0);
178 eina_lock_take(&_lock); 180 eina_lock_take(&_lock);
179 desktop->ref++; 181 desktop->ref++;
182 ret = desktop->ref;
180 eina_lock_release(&_lock); 183 eina_lock_release(&_lock);
181 return desktop->ref; 184 return ret;
182} 185}
183 186
184EAPI Efreet_Desktop * 187EAPI Efreet_Desktop *