1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 12:28:22 +01:00

util: fix misleading indentation in assemblePLMenuFunc (Coverity #50094)

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.curis@free.fr>
This commit is contained in:
Christophe CURIS
2014-06-16 20:15:18 +02:00
committed by Carlos R. Mafra
parent b5e2821c3e
commit 2e7ca448ae

View File

@@ -239,11 +239,13 @@ 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"),