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

As pointed by Coverity, the indentation for a block of code could lead to
misinterpretation on when it is executed. To make code safer, re-indented
the code properly and added some blank lines for clarity.

Signed-off-by: Christophe CURIS <christophe.cu...@free.fr>
---
 util/wmmenugen.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/util/wmmenugen.c b/util/wmmenugen.c
index 2348769..47771f5 100644
--- a/util/wmmenugen.c
+++ b/util/wmmenugen.c
@@ -239,17 +239,19 @@ static void assemblePLMenuFunc(WMTreeNode *aNode, void 
*data)
                        );
                } else {                                /* plain simple command 
*/
                        char buf[1024];
+
                        memset(buf, 0, sizeof(buf));
                        if (wm->Flags & F_TERMINAL)     /* XXX: quoting! */
                                snprintf(buf, sizeof(buf), "%s -e \"%s\"", 
terminal, wm->CmdLine);
                        else
                                snprintf(buf, sizeof(buf), "%s", wm->CmdLine);
-                               WMAddToPLArray(pl, WMCreatePLArray(
-                                       WMCreatePLString(wm->Name),
-                                       WMCreatePLString("SHEXEC"),
-                                       WMCreatePLString(buf),
-                                       NULL)
-                               );
+
+                       WMAddToPLArray(pl, WMCreatePLArray(
+                               WMCreatePLString(wm->Name),
+                               WMCreatePLString("SHEXEC"),
+                               WMCreatePLString(buf),
+                               NULL)
+                       );
                }
                WMAddToArray(plMenuNodes, pl);
        }
-- 
1.9.2


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

Reply via email to