From: "Rodolfo García Peñas (kix)" <[email protected]>

The function remove_wwindowstate is now remove_wwindowstate. This was
proposed by Christophe and Carlos:

- - -
On 2012-10-09 01:09, Carlos R. Mafra wrote:
> On Tue,  9 Oct 2012 at  0:58:19 +0200, Christophe wrote:
> you name the function "remove_*", which makes think that it would
> remove the entry from the list, but the function does not do that, it
> just frees the memory, so it may have been better called "free_" (or
> maybe "release_")?
>

Good point, release_ makes more sense to me.
- - -
---
 src/window.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/window.c b/src/window.c
index f0f093d..4691021 100644
--- a/src/window.c
+++ b/src/window.c
@@ -109,7 +109,7 @@ static void titlebarMouseDown(WCoreWindow *sender, void 
*data, XEvent *event);
 static void titlebarDblClick(WCoreWindow *sender, void *data, XEvent *event);
 static void resizebarMouseDown(WCoreWindow *sender, void *data, XEvent *event);
 
-static void remove_wwindowstate(WWindowState *wstate);
+static void release_wwindowstate(WWindowState *wstate);
 
 /****** Notification Observers ******/
 
@@ -2598,12 +2598,12 @@ void wWindowDeleteSavedState(WMagicNumber id)
        tmp = windowState;
        if (tmp == wstate) {
                windowState = wstate->next;
-               remove_wwindowstate(wstate);
+               release_wwindowstate(wstate);
        } else {
                while (tmp->next) {
                        if (tmp->next == wstate) {
                                tmp->next = wstate->next;
-                               remove_wwindowstate(wstate);
+                               release_wwindowstate(wstate);
                                break;
                        }
                        tmp = tmp->next;
@@ -2623,13 +2623,13 @@ void wWindowDeleteSavedStatesForPID(pid_t pid)
                wstate = windowState;
                windowState = tmp->next;
 
-               remove_wwindowstate(wstate);
+               release_wwindowstate(wstate);
        } else {
                while (tmp->next) {
                        if (tmp->next->pid == pid) {
                                wstate = tmp->next;
                                tmp->next = wstate->next;
-                               remove_wwindowstate(wstate);
+                               release_wwindowstate(wstate);
                                break;
                        }
                        tmp = tmp->next;
@@ -2637,7 +2637,7 @@ void wWindowDeleteSavedStatesForPID(pid_t pid)
        }
 }
 
-static void remove_wwindowstate(WWindowState *wstate)
+static void release_wwindowstate(WWindowState *wstate)
 {
        if (wstate->instance)
                wfree(wstate->instance);
-- 
1.7.10.4


-- 
To unsubscribe, send mail to [email protected].

Reply via email to