From eea8749f9b57e0aae840ddab770b8ca7eb1957fe Mon Sep 17 00:00:00 2001 From: sun_fan Date: Wed, 4 Aug 2021 11:16:10 +0800 Subject: [PATCH] init:fix code style Signed-off-by: sun_fan --- services/src/init_cmds.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/services/src/init_cmds.c b/services/src/init_cmds.c index 3416e504..23d66218 100644 --- a/services/src/init_cmds.c +++ b/services/src/init_cmds.c @@ -17,6 +17,11 @@ #include #include +#include +#ifndef OHOS_LITE +#include +#endif +#include #include #include #include @@ -25,15 +30,10 @@ #include #include #include +#include #include #include #include -#include -#include -#ifndef OHOS_LITE -#include -#endif -#include #include "init_jobs.h" #include "init_log.h" #ifndef OHOS_LITE @@ -221,7 +221,7 @@ void FreeCmd(struct CmdArgs **cmd) #define EXTRACT_ARGS(cmdname, cmdContent, args) \ struct CmdArgs *ctx = GetCmd(cmdContent, " ", args); \ - if (ctx == NULL || ctx->argv == NULL || ctx->argc != args) { \ + if ((ctx == NULL) || (ctx->argv == NULL) || (ctx->argc != args)) { \ INIT_LOGE("Command \"%s\" with invalid arguments: %s", #cmdname, cmdContent); \ goto out; \ } \ -- GitLab