未验证 提交 4625b0c8 编写于 作者: P plum-lihui 提交者: GitHub

Merge pull request #1354 from sangshuduo/remove-unused-vid-comparison-with-0

remove unused comparison with 0 as vid >=0 htons() return
...@@ -103,7 +103,7 @@ int vnodeProcessCreateMeterRequest(char *pMsg, int msgLen, SMgmtObj *pObj) { ...@@ -103,7 +103,7 @@ int vnodeProcessCreateMeterRequest(char *pMsg, int msgLen, SMgmtObj *pObj) {
pCreate = (SCreateMsg *)pMsg; pCreate = (SCreateMsg *)pMsg;
vid = htons(pCreate->vnode); vid = htons(pCreate->vnode);
if (vid >= TSDB_MAX_VNODES || vid < 0) { if (vid >= TSDB_MAX_VNODES) {
dError("vid:%d, vnode is out of range", vid); dError("vid:%d, vnode is out of range", vid);
code = TSDB_CODE_INVALID_VNODE_ID; code = TSDB_CODE_INVALID_VNODE_ID;
goto _over; goto _over;
...@@ -139,7 +139,7 @@ int vnodeProcessAlterStreamRequest(char *pMsg, int msgLen, SMgmtObj *pObj) { ...@@ -139,7 +139,7 @@ int vnodeProcessAlterStreamRequest(char *pMsg, int msgLen, SMgmtObj *pObj) {
vid = htons(pAlter->vnode); vid = htons(pAlter->vnode);
sid = htonl(pAlter->sid); sid = htonl(pAlter->sid);
if (vid >= TSDB_MAX_VNODES || vid < 0) { if (vid >= TSDB_MAX_VNODES) {
dError("vid:%d, vnode is out of range", vid); dError("vid:%d, vnode is out of range", vid);
code = TSDB_CODE_INVALID_VNODE_ID; code = TSDB_CODE_INVALID_VNODE_ID;
goto _over; goto _over;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册