summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>2014-08-29 12:47:58 +0300
committerSamuel Ortiz <sameo@linux.intel.com>2014-09-08 00:40:51 +0200
commit855ac4449ed42bc5c57f692894bd32328ebda4e4 (patch)
treee8d2e1ab9bd10c1aee98ac0fc4494237effafa5b
parent77a4e1dbad6b272a2339de2082cae6dc30ce4d12 (diff)
downloadneardal-855ac4449ed42bc5c57f692894bd32328ebda4e4.tar.gz
neardal-855ac4449ed42bc5c57f692894bd32328ebda4e4.tar.bz2
neardal-855ac4449ed42bc5c57f692894bd32328ebda4e4.zip
Minor style cleanup.
-rw-r--r--ncl/ncl.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/ncl/ncl.c b/ncl/ncl.c
index e285f93..be9a176 100644
--- a/ncl/ncl.c
+++ b/ncl/ncl.c
@@ -166,17 +166,16 @@ static ncl_cmd_func ncl_prv_find_func(char *cmd)
NCLError ncl_exec(char *cmd)
{
- NCLError ret = NCLERR_PARSING_PARAMETERS;
- GError *gerr = NULL;
- ncl_cmd_func func = NULL;
- int argc;
+ NCLError ret = NCLERR_PARSING_PARAMETERS;
+ GError *gerr = NULL;
+ ncl_cmd_func func = NULL;
char **argv = NULL;
+ int argc;
if (!g_shell_parse_argv(g_strstrip(cmd), &argc, &argv, &gerr))
goto exit;
- func = ncl_prv_find_func(argv[0]);
- if (!func) {
+ if (!(func = ncl_prv_find_func(argv[0]))) {
NCL_CMD_PRINTERR("'%s': Not NCL command, trying shell\n", cmd);
g_spawn_command_line_async(cmd, &gerr);
goto exit;