From c970c94f82e7120f39eebbe8a7fc988d73458d6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20D=C3=A9chelotte?= Date: Sun, 5 Mar 2006 19:41:47 +0100 Subject: [PATCH] Remove useless tests There is no point in checking if (dock_state) if the function would have already returned with the check if(!dock_state) right above. Retrived from http://yo.dan.free.fr/wmaker.phtml.en [crmafra: wrote the commit message] --- src/dock.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/dock.c b/src/dock.c index 45aceb9a..9f528ffd 100644 --- a/src/dock.c +++ b/src/dock.c @@ -1532,8 +1532,8 @@ WAppIcon *wClipRestoreState(WScreen * scr, WMPropList * clip_state) if (!clip_state) return icon; - else - WMRetainPropList(clip_state); + + WMRetainPropList(clip_state); /* restore position */ @@ -1587,8 +1587,7 @@ WDock *wDockRestoreState(WScreen * scr, WMPropList * dock_state, int type) if (!dock_state) return dock; - if (dock_state) - WMRetainPropList(dock_state); + WMRetainPropList(dock_state); /* restore position */ @@ -1807,8 +1806,7 @@ WDock *wDockRestoreState(WScreen * scr, WMPropList * dock_state, int type) } finish: - if (dock_state) - WMReleasePropList(dock_state); + WMReleasePropList(dock_state); return dock; }