Ok, no problem :-) Done.
"Carlos R. Mafra" <[email protected]> escribió:
On Thu, 10 Oct 2013 at 0:34:36 +0200, Rodolfo García Peñas (kix) wrote:
From: "Rodolfo García Peñas (kix)" <[email protected]>
This patch set the variable aicon to NULL, to avoid compiler warnings.
This patch also adds some code style.
---
src/dock.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/src/dock.c b/src/dock.c
index 1e0405c..cb92555 100644
--- a/src/dock.c
+++ b/src/dock.c
@@ -4342,7 +4342,7 @@ static void drawerDestroy(WDock *drawer)
{
WScreen *scr;
int i;
- WAppIcon *aicon;
+ WAppIcon *aicon = NULL;
WMArray *icons;
if (drawer == NULL)
@@ -4353,21 +4353,20 @@ static void drawerDestroy(WDock *drawer)
/* Note regarding menus: we can't delete any dock/clip/drawer
menu, because
* that would (attempt to) wfree some memory in gettext library (see
menu
* entries that have several "versions", such like "Hide" and
"Unhide"). */
-
wDefaultPurgeInfo(scr, drawer->icon_array[0]->wm_instance,
drawer->icon_array[0]->wm_class);
+
if (drawer->icon_count == 2) {
- // Drawer contains a single appicon: dock it where the drawer
was
- for (i = 1; i < drawer->max_icons; i++) {
+ /* Drawer contains a single appicon: dock it where the drawer
was */
+ for (i = 1; i < drawer->max_icons; i++)
if ((aicon = drawer->icon_array[i]))
break;
- }
+
I wouldn't remove the brackets in the last 'for' loop though. This smells
like trouble in the future.
--
To unsubscribe, send mail to [email protected].
Rodolfo García Peñas (kix)
http://www.kix.es/
--
To unsubscribe, send mail to [email protected].