提交 f8811656 编写于 作者: O openharmony_ci 提交者: Gitee

!83 style:fix code style

Merge pull request !83 from 熊磊/updatersf89_2
...@@ -242,12 +242,10 @@ static void DoSetDomainname(const char *cmdContent, int maxArg) ...@@ -242,12 +242,10 @@ 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;
}
out: out:
FreeCmd(&ctx); FreeCmd(&ctx);
fd = -1;
return; return;
} }
...@@ -267,12 +265,10 @@ static void DoSetHostname(const char *cmdContent, int maxArg) ...@@ -267,12 +265,10 @@ 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;
}
out: out:
FreeCmd(&ctx); FreeCmd(&ctx);
fd = -1;
return; return;
} }
...@@ -305,12 +301,10 @@ static void DoIfup(const char *cmdContent, int maxArg) ...@@ -305,12 +301,10 @@ static void DoIfup(const char *cmdContent, int maxArg)
INIT_LOGE("DoIfup failed to do ioctl with command \"SIOCSIFFLAGS\", err = %d", errno); INIT_LOGE("DoIfup failed to do ioctl with command \"SIOCSIFFLAGS\", err = %d", errno);
} }
if (fd > 0) { close(fd);
close(fd);
fd = -1;
}
out: out:
FreeCmd(&ctx); FreeCmd(&ctx);
fd = -1;
return; return;
} }
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册