未验证 提交 3b0a3c86 编写于 作者: O openharmony_ci 提交者: Gitee

!1033 修复代码静态检查(0805)

Merge pull request !1033 from chneg_jinsong/codex
......@@ -48,6 +48,7 @@ mode_str = {
'ONLY_CHECK_ARGS': 1
}
def is_hex_digit(s):
try:
int(s, 16)
......
......@@ -33,7 +33,7 @@ int ConnectServer(int fd, const char *servername)
addr.sun_family = AF_UNIX;
ret = sprintf_s(addr.sun_path, sizeof(addr.sun_path) - 1, "%s", servername);
PARAM_CHECK(ret > EOK, return -1, "Failed to sprintf_s server address");
int len = offsetof(struct sockaddr_un, sun_path) + strlen(addr.sun_path);
size_t len = offsetof(struct sockaddr_un, sun_path) + strlen(addr.sun_path);
ret = connect(fd, (struct sockaddr *)&addr, len);
PARAM_CHECK(ret != -1, return -1, "Failed to connect server %s %d", servername, errno);
PARAM_LOGV("ConnectServer %s success", servername);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册