From 0bd7bcd434ff6420d381c609f9eef94df5f61afd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20=28kix=29?= Date: Wed, 24 Oct 2012 00:00:01 +0200 Subject: [PATCH] remove_wwindowstate name changed 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 f0f093d7..4691021f 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); -- 2.11.4.GIT