From: Christophe CURIS <christophe.cu...@free.fr>

It is a bad idea to take the habit to include assignations inside the
expression of an if because it leads to subtle bugs. It is likely that
someday compiler will be able to warn for this, so let's fix it now, the
code will be simpler and thus easier to maintain.

Signed-off-by: Christophe CURIS <christophe.cu...@free.fr>
---
 WPrefs.app/Appearance.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/WPrefs.app/Appearance.c b/WPrefs.app/Appearance.c
index b04909b..21dad63 100644
--- a/WPrefs.app/Appearance.c
+++ b/WPrefs.app/Appearance.c
@@ -509,7 +509,8 @@ static Pixmap renderTexture(WMScreen * scr, WMPropList * 
texture, int width, int
                char *path;
 
                str = WMGetFromPLString(WMGetFromPLArray(texture, 1));
-               if ((path = wfindfileinarray(GetObjectForKey("PixmapPath"), 
str)) != NULL) {
+               path = wfindfileinarray(GetObjectForKey("PixmapPath"), str);
+               if (path != NULL) {
                        timage = RLoadImage(rc, path, 0);
                }
                if (!path || !timage) {
-- 
1.9.2


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.

Reply via email to