提交 b87ff824 编写于 作者: S sun_fan

init: fix code style

Signed-off-by: Nsun_fan <sun_fan1@hoperun.com>
上级 03ba491f
...@@ -242,12 +242,11 @@ static void DoSetDomainname(const char *cmdContent, int maxArg) ...@@ -242,12 +242,11 @@ static void DoSetDomainname(const char *cmdContent, int maxArg)
INIT_LOGE("DoSetHostname failed to write %s to \"/proc/sys/kernel/domainname\". err = %d", errno); INIT_LOGE("DoSetHostname failed to write %s to \"/proc/sys/kernel/domainname\". err = %d", errno);
} }
if (fd > 0) { close(fd);
close(fd); fd = -1;
fd = -1;
}
out: out:
FreeCmd(&ctx); FreeCmd(&ctx);
fd = -1;
return; return;
} }
...@@ -267,12 +266,11 @@ static void DoSetHostname(const char *cmdContent, int maxArg) ...@@ -267,12 +266,11 @@ static void DoSetHostname(const char *cmdContent, int maxArg)
INIT_LOGE("DoSetHostname failed to write %s to \"/proc/sys/kernel/hostname\". err = %d", errno); INIT_LOGE("DoSetHostname failed to write %s to \"/proc/sys/kernel/hostname\". err = %d", errno);
} }
if (fd > 0) { close(fd);
close(fd); fd = -1;
fd = -1;
}
out: out:
FreeCmd(&ctx); FreeCmd(&ctx);
fd = -1;
return; return;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册