Skip to content

Commit

Permalink
Fix an issue where the previous commit did not take effect due to an …
Browse files Browse the repository at this point in the history
…incorrect data type (#319)
  • Loading branch information
SwimmingTiger committed Jun 19, 2019
1 parent e1ab487 commit 12228a2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/UserInfo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,9 @@ void UserInfo::handleSwitchChainEvent(
UserInfo *userInfo = (UserInfo *)pUserInfo;
string nodePath(path);

if (nodePath.size() - userInfo->zkUserChainMapDir_.size() < 1) {
if (static_cast<ssize_t>(nodePath.size()) -
static_cast<ssize_t>(userInfo->zkUserChainMapDir_.size()) <
1) {
return;
}

Expand Down Expand Up @@ -499,7 +501,9 @@ void UserInfo::handleAutoRegEvent(
UserInfo *userInfo = (UserInfo *)pUserInfo;
string nodePath(path);

if (nodePath.size() - userInfo->zkUserChainMapDir_.size() < 1) {
if (static_cast<ssize_t>(nodePath.size()) -
static_cast<ssize_t>(userInfo->zkUserChainMapDir_.size()) <
1) {
return;
}

Expand Down

0 comments on commit 12228a2

Please sign in to comment.