diff --git a/source/dnode/mnode/impl/src/mndUser.c b/source/dnode/mnode/impl/src/mndUser.c index 8f9b9889bb..5a40fb1e30 100644 --- a/source/dnode/mnode/impl/src/mndUser.c +++ b/source/dnode/mnode/impl/src/mndUser.c @@ -91,6 +91,15 @@ static void ipRangeListToStr(SIpV4Range *range, int32_t num, char *buf) { } if (len > 0) buf[len - 1] = 0; } +static bool isRangeInIpWhiteList(SIpWhiteList *pList, SIpV4Range *tgt) { + for (int i = 0; i < pList->num; i++) { + SIpV4Range *el = &pList->pIpRange[i]; + if (tgt->ip == el->ip && tgt->mask == el->mask) { + return true; + } + } + return false; +} int32_t convertIpWhiteListToStr(SIpWhiteList *pList, char **buf) { if (pList->num == 0) { *buf = NULL; @@ -170,15 +179,6 @@ static SIpWhiteList *cloneIpWhiteList(SIpWhiteList *pIpWhiteList) { memcpy(pNew, pIpWhiteList, sz); return pNew; } -static bool isRangeInIpWhiteList(SIpWhiteList *pList, SIpV4Range *tgt) { - for (int i = 0; i < pList->num; i++) { - SIpV4Range *el = &pList->pIpRange[i]; - if (tgt->ip == el->ip && tgt->mask == el->mask) { - return true; - } - } - return false; -} static int32_t mndCreateDefaultUser(SMnode *pMnode, char *acct, char *user, char *pass) { SUserObj userObj = {0};